Add embedder (#818)

This commit is contained in:
Eddie Santos
2025-06-07 13:38:05 -07:00
committed by GitHub
parent 51cd5ffd91
commit 27fdd1b6e6
8 changed files with 206 additions and 21 deletions

View File

@@ -48,9 +48,11 @@ describe('Server Config (config.ts)', () => {
const USER_AGENT = 'ServerTestAgent/1.0';
const USER_MEMORY = 'Test User Memory';
const TELEMETRY = false;
const EMBEDDING_MODEL = 'gemini-embedding';
const baseParams: ConfigParameters = {
apiKey: API_KEY,
model: MODEL,
embeddingModel: EMBEDDING_MODEL,
sandbox: SANDBOX,
targetDir: TARGET_DIR,
debugMode: DEBUG_MODE,

View File

@@ -55,6 +55,7 @@ export class MCPServerConfig {
export interface ConfigParameters {
apiKey: string;
model: string;
embeddingModel: string;
sandbox: boolean | string;
targetDir: string;
debugMode: boolean;
@@ -84,6 +85,7 @@ export class Config {
private toolRegistry: Promise<ToolRegistry>;
private readonly apiKey: string;
private readonly model: string;
private readonly embeddingModel: string;
private readonly sandbox: boolean | string;
private readonly targetDir: string;
private readonly debugMode: boolean;
@@ -113,6 +115,7 @@ export class Config {
constructor(params: ConfigParameters) {
this.apiKey = params.apiKey;
this.model = params.model;
this.embeddingModel = params.embeddingModel;
this.sandbox = params.sandbox;
this.targetDir = path.resolve(params.targetDir);
this.debugMode = params.debugMode;
@@ -163,6 +166,10 @@ export class Config {
return this.model;
}
getEmbeddingModel(): string {
return this.embeddingModel;
}
getSandbox(): boolean | string {
return this.sandbox;
}