Skip to content

Commit

Permalink
fix: completions no body
Browse files Browse the repository at this point in the history
  • Loading branch information
sshivaditya committed Jan 10, 2025
1 parent d007fb0 commit e07a826
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 11 deletions.
10 changes: 1 addition & 9 deletions src/adapters/anthropic/helpers/completions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -392,15 +392,7 @@ export class Completions extends SuperAnthropic {
messages: conversationHistory,
temperature: 0.2,
max_tokens: this.maxTokens,
system: [
{
type: "text",
text: sysMsg,
cache_control: {
type: "ephemeral",
},
},
],
system: sysMsg,
});

this.context.logger.info("LLM response:", { response: res });
Expand Down
2 changes: 1 addition & 1 deletion src/adapters/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Anthropic from "@anthropic-ai/sdk";

export function createAdapters(anthropic: Anthropic, context: Context) {
return {
openai: {
anthropic: {
completions: new Completions(anthropic, context),
super: new SuperAnthropic(anthropic, context),
},
Expand Down
2 changes: 1 addition & 1 deletion src/handlers/front-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export async function delegate(context: Context) {
const prompt = `Please help resolve this issue:\n${issueDescription}\n\nRepository: ${owner}/${repo}\nIssue #${issueNumber}\n\nFile tree:\n${fileTree}`;

// Get the solution with retries and verification
const solution = await context.adapters.openai.completions.createCompletion(prompt, "anthropic/claude-3.5-sonnet", workingDir);
const solution = await context.adapters.anthropic.completions.createCompletion(prompt, "anthropic/claude-3.5-sonnet", workingDir);

if (!solution) {
logger.error("No solution was generated");
Expand Down

0 comments on commit e07a826

Please sign in to comment.