Skip to content

Commit

Permalink
chore: fixed frontend call
Browse files Browse the repository at this point in the history
  • Loading branch information
gentlementlegen committed Dec 19, 2024
1 parent 85029f0 commit 66c1e77
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/parser/content-evaluator-module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ export class ContentEvaluatorModule extends BaseModule {
const maxTokens = this._calculateMaxTokens(dummyResponse);

const promptForComments = this._generatePromptForComments(specification, comments, allComments);
// check token count
commentRelevances = await this._submitPrompt(promptForComments, maxTokens);
}

Expand All @@ -201,6 +202,7 @@ export class ContentEvaluatorModule extends BaseModule {
const maxTokens = this._calculateMaxTokens(dummyResponse);

const promptForPrComments = this._generatePromptForPrComments(specification, prComments);
// check token count
prCommentRelevances = await this._submitPrompt(promptForPrComments, maxTokens);
}

Expand Down
2 changes: 1 addition & 1 deletion src/web/api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const app = {
if (
request.method === "POST" &&
new URL(request.url).pathname === "/" &&
request.headers.get("origin") === "http://localhost:4000"
request.headers.get("referer")?.includes("http://localhost:4000")
) {
try {
const originalBody = await request.json();
Expand Down

0 comments on commit 66c1e77

Please sign in to comment.