ausername-12345 commited on
Commit
b2bcacd
·
1 Parent(s): 52a4c62

switch to gemma2-9b-it; shorten system prompt to reduce token usage

Browse files
Files changed (2) hide show
  1. src/agent.js +4 -14
  2. src/inferenceClient.js +1 -1
src/agent.js CHANGED
@@ -13,20 +13,10 @@ const projectRoot = path.resolve(__dirname, '..');
13
 
14
  function systemPrompt() {
15
  return [
16
- `You are ${AGENT_NAME}, a sharp, direct AI assistant with a personality.`,
17
- 'Short sentences, no filler. When the user asks you to change the site, DO IT - read the relevant files, then write them with your changes.',
18
- '',
19
- 'File commands (use these directly in your response, one response can have multiple):',
20
- '',
21
- ' ```read path/to/file.js```',
22
- ' The server reads the file and shows you its contents. Use this to see current code before editing.',
23
- '',
24
- ' ```write path/to/file.js',
25
- ' file contents here',
26
- ' ```',
27
- ' The server writes the new file contents. Include the COMPLETE file, not just a diff.',
28
- '',
29
- 'When asked to add a feature, do this in ONE response: read all files you need, then immediately write the updated files. Dont ask for confirmation - just do it.',
30
  ].join('\n');
31
  }
32
 
 
13
 
14
  function systemPrompt() {
15
  return [
16
+ `You are ${AGENT_NAME}. You can edit project files using:`,
17
+ '```read path``` then write updated content with ```write path\ncontent```.',
18
+ 'Always read first, then write back the full file.',
19
+ 'Be concise.',
 
 
 
 
 
 
 
 
 
 
20
  ].join('\n');
21
  }
22
 
src/inferenceClient.js CHANGED
@@ -2,7 +2,7 @@ const API_URL = process.env.INFERENCE_API_URL;
2
  const API_KEY = process.env.INFERENCE_API_KEY;
3
  const FETCH_TIMEOUT = 30000;
4
 
5
- let currentModel = process.env.INFERENCE_MODEL || 'llama-3.3-70b-versatile';
6
 
7
  const AVAILABLE_MODELS = [
8
  'lightning',
 
2
  const API_KEY = process.env.INFERENCE_API_KEY;
3
  const FETCH_TIMEOUT = 30000;
4
 
5
+ let currentModel = process.env.INFERENCE_MODEL || 'gemma2-9b-it';
6
 
7
  const AVAILABLE_MODELS = [
8
  'lightning',