mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-21 01:07:46 +00:00
Add embedder (#818)
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user