Skip to content

Commit

Permalink
fix: context is empty add logger
Browse files Browse the repository at this point in the history
  • Loading branch information
sshivaditya committed Jan 13, 2025
1 parent 6012c34 commit 6b2085f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion src/adapters/openai/helpers/completions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ export class Completions extends SuperOpenAi {
): Promise<CompletionsType> {
const numTokens = await this.findTokenLength(query, additionalContext, localContext, groundTruths);
logger.debug(`Number of tokens: ${numTokens}`);
logger.info(`Local context: ${localContext.join("\n")}`);
const sysMsg = [
"You Must obey the following ground truths: ",
JSON.stringify(groundTruths) + "\n",
Expand Down
2 changes: 1 addition & 1 deletion src/handlers/ask-llm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export async function askQuestion(context: Context, question: string) {
// includes the current issue, any linked issues, and any linked PRs
const formattedChat = await formatChatHistory(context, maxDepth);
logger.debug("Formatted chat history " + formattedChat.join("\n"));
return await askLlm(context, question, []);
return await askLlm(context, question, formattedChat);
}

export async function askLlm(context: Context, question: string, formattedChat: string[]): Promise<CompletionsType> {
Expand Down

0 comments on commit 6b2085f

Please sign in to comment.