mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-20 16:57:46 +00:00
Introduce ContentGeneratorConfig (#826)
This commit is contained in:
committed by
GitHub
parent
e95a6086fc
commit
389907ce65
@@ -50,15 +50,17 @@ describe('Server Config (config.ts)', () => {
|
||||
const TELEMETRY = false;
|
||||
const EMBEDDING_MODEL = 'gemini-embedding';
|
||||
const baseParams: ConfigParameters = {
|
||||
apiKey: API_KEY,
|
||||
model: MODEL,
|
||||
contentGeneratorConfig: {
|
||||
apiKey: API_KEY,
|
||||
model: MODEL,
|
||||
userAgent: USER_AGENT,
|
||||
},
|
||||
embeddingModel: EMBEDDING_MODEL,
|
||||
sandbox: SANDBOX,
|
||||
targetDir: TARGET_DIR,
|
||||
debugMode: DEBUG_MODE,
|
||||
question: QUESTION,
|
||||
fullContext: FULL_CONTEXT,
|
||||
userAgent: USER_AGENT,
|
||||
userMemory: USER_MEMORY,
|
||||
telemetry: TELEMETRY,
|
||||
};
|
||||
@@ -73,10 +75,7 @@ describe('Server Config (config.ts)', () => {
|
||||
|
||||
expect(config.getUserMemory()).toBe(USER_MEMORY);
|
||||
// Verify other getters if needed
|
||||
expect(config.getApiKey()).toBe(API_KEY);
|
||||
expect(config.getModel()).toBe(MODEL);
|
||||
expect(config.getTargetDir()).toBe(path.resolve(TARGET_DIR)); // Check resolved path
|
||||
expect(config.getUserAgent()).toBe(USER_AGENT);
|
||||
});
|
||||
|
||||
it('Config constructor should default userMemory to empty string if not provided', () => {
|
||||
|
||||
Reference in New Issue
Block a user