Skip to content

Commit

Permalink
chore: renamed GithubComment to GitHubCommentScore and use latest gpt…
Browse files Browse the repository at this point in the history
… 4 model
  • Loading branch information
gentlementlegen authored and gentlementlegen committed Mar 24, 2024
1 parent e78b7c3 commit c87850c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/parser/content-evaluator-module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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";
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/parser/formatting-evaluator-module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions src/parser/processor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,15 @@ export interface Module {

export interface Result {
[k: string]: {
comments?: GithubComment[];
comments?: GithubCommentScore[];
total: number;
task?: {
reward: number;
};
};
}

export interface GithubComment {
export interface GithubCommentScore {
content: string;
url: string;
type: CommentType;
Expand Down

0 comments on commit c87850c

Please sign in to comment.