Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: improve embeddings, models and connectivity #677

Merged
merged 2 commits into from
Nov 29, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions packages/core/src/embedding.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import path from "node:path";
import { models } from "./models.ts";
import { IAgentRuntime, ModelProviderName, ModelClass } from "./types.ts";
// import fs from "fs";
import { trimTokens } from "./generation.ts";
import { IAgentRuntime, ModelProviderName } from "./types.ts";
import settings from "./settings.ts";
import elizaLogger from "./logger.ts";
import { EmbeddingModel } from "fastembed";
@@ -110,7 +108,7 @@ export function getEmbeddingType(runtime: IAgentRuntime): "local" | "remote" {
return isLocal ? "local" : "remote";
}

export function getEmbeddingZeroVector(runtime: IAgentRuntime): number[] {
export function getEmbeddingZeroVector(): number[] {
let embeddingDimension = 384; // Default BGE dimension

if (settings.USE_OPENAI_EMBEDDING?.toLowerCase() === "true") {
2 changes: 0 additions & 2 deletions packages/core/src/logger.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import settings from "./settings.ts";

class ElizaLogger {
constructor() {
// Check if we're in Node.js environment
Loading