Skip to content

Commit

Permalink
feat: make maxDepth a config param
Browse files Browse the repository at this point in the history
  • Loading branch information
sshivaditya committed Jan 6, 2025
1 parent 6e1b819 commit 6a01303
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/handlers/ask-llm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,16 @@ import { findGroundTruths } from "./ground-truths/find-ground-truths";
import { bubbleUpErrorComment, logger } from "../helpers/errors";

export async function askQuestion(context: Context, question: string) {
const {
config: { maxDepth },
} = context;
if (!question) {
throw logger.error("No question provided");
}
// using any links in comments or issue/pr bodies to fetch more context
const { specAndBodies, streamlinedComments } = await recursivelyFetchLinkedIssues({
context,
maxDepth: 2,
maxDepth,
owner: context.payload.repository.owner.login,
repo: context.payload.repository.name,
issueNum: context.payload.issue.number,
Expand Down
1 change: 1 addition & 0 deletions src/types/plugin-input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export const pluginSettingsSchema = T.Object({
model: T.String({ default: "o1-mini" }),
openAiBaseUrl: T.Optional(T.String()),
similarityThreshold: T.Number({ default: 0.9 }),
maxDepth: T.Number({ default: 3 }),
maxTokens: T.Number({ default: 10000 }),
});

Expand Down

0 comments on commit 6a01303

Please sign in to comment.