Skip to content

Commit

Permalink
fix(code-interpreter): switch to llama
Browse files Browse the repository at this point in the history
  • Loading branch information
JanPokorny committed Oct 17, 2024
1 parent 815b2e4 commit 63e342b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/runs/execution/factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,15 +165,15 @@ export function createCodeLLM(backend: LLMBackend = LLM_BACKEND) {
});
return new IBMvLLM({
client: vllmClient,
modelId: 'ibm/granite-34b-code-instruct',
modelId: 'meta-llama/llama-3-1-70b-instruct',
parameters: { method: 'GREEDY', stopping: { include_stop_sequence: false } }
});
}
case LLMBackend.BAM: {
bamClient ??= new BAMClient({ apiKey: BAM_API_KEY ?? undefined });
return new BAMLLM({
client: bamClient,
modelId: 'ibm/granite-34b-code-instruct',
modelId: 'meta-llama/llama-3-1-70b-instruct',
parameters: {
decoding_method: 'greedy',
include_stop_sequence: false
Expand All @@ -184,7 +184,7 @@ export function createCodeLLM(backend: LLMBackend = LLM_BACKEND) {
if (!WATSONX_API_KEY) throw new Error('Missing WATSONX_API_KEY');
if (!WATSONX_PROJECT_ID) throw new Error('Missing WATSONX_PROJECT_ID');
return new WatsonXLLM({
modelId: 'ibm/granite-34b-code-instruct',
modelId: 'meta-llama/llama-3-1-70b-instruct',
apiKey: WATSONX_API_KEY,
projectId: WATSONX_PROJECT_ID,
parameters: {
Expand Down
2 changes: 1 addition & 1 deletion src/runs/execution/tools/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ export async function getTools(run: LoadedRun, context: AgentContext): Promise<F
llm: codeLLM,
promptTemplate: new PromptTemplate({
schema: z.object({ input: z.string() }),
template: `Your task is to fix provided Python Code that may or may not contain a syntax error.\nIMPORTANT: the output must not contain any additional comments or explanation.\n\nInput:\n{{input}}\n\nOutput:\n`
template: `Your task is to fix the provided code that may or may not contain a syntax error.\nIMPORTANT: the output must not contain any additional comments or explanation.\n\nInput:\n{{input}}\n\nOutput:\n`
})
}
: undefined
Expand Down

0 comments on commit 63e342b

Please sign in to comment.