diff --git a/src/parser/content-evaluator-module.ts b/src/parser/content-evaluator-module.ts index 760344e7..29948b45 100644 --- a/src/parser/content-evaluator-module.ts +++ b/src/parser/content-evaluator-module.ts @@ -4,7 +4,7 @@ import OpenAI from "openai"; import configuration from "../configuration/config-reader"; import { GetActivity } from "../get-activity"; import { GitHubIssue } from "../github-types"; -import { GithubComment, Module, Result } from "./processor"; +import { GithubCommentScore, Module, Result } from "./processor"; /** * Evaluates and rates comments. @@ -40,7 +40,7 @@ export class ContentEvaluatorModule implements Module { return result; } - async _processComment(comments: GithubComment[], specificationBody: string, commentsBody: string[]) { + async _processComment(comments: GithubCommentScore[], specificationBody: string, commentsBody: string[]) { const relevance = await this._sampleRelevanceScoreResults(specificationBody, commentsBody); if (relevance.length !== comments.length) { @@ -98,7 +98,7 @@ export class ContentEvaluatorModule implements Module { return "gpt-3.5-turbo-16k"; } else { console.warn("Backup plan for development purposes only, but using gpt-4 due to huge context size"); - return "gpt-4"; + return "gpt-4-turbo-preview"; } } diff --git a/src/parser/formatting-evaluator-module.ts b/src/parser/formatting-evaluator-module.ts index 5be02ef5..4ae0dc96 100644 --- a/src/parser/formatting-evaluator-module.ts +++ b/src/parser/formatting-evaluator-module.ts @@ -3,7 +3,7 @@ import { JSDOM } from "jsdom"; import MarkdownIt from "markdown-it"; import configuration from "../configuration/config-reader"; import { CommentType, GetActivity } from "../get-activity"; -import { GithubComment, Module, Result } from "./processor"; +import { GithubCommentScore, Module, Result } from "./processor"; interface Multiplier { formattingMultiplier: number; @@ -71,7 +71,7 @@ export class FormattingEvaluatorModule implements Module { return this._configuration?.enabled; } - _getFormattingScore(comment: GithubComment) { + _getFormattingScore(comment: GithubCommentScore) { const html = this._md.render(comment.content); const temp = new JSDOM(html); if (temp.window.document.body) { diff --git a/src/parser/processor.ts b/src/parser/processor.ts index 1b205f1e..4ebc0df3 100644 --- a/src/parser/processor.ts +++ b/src/parser/processor.ts @@ -93,7 +93,7 @@ export interface Module { export interface Result { [k: string]: { - comments?: GithubComment[]; + comments?: GithubCommentScore[]; total: number; task?: { reward: number; @@ -101,7 +101,7 @@ export interface Result { }; } -export interface GithubComment { +export interface GithubCommentScore { content: string; url: string; type: CommentType;