Skip to content

Commit

Permalink
chore: removed logs
Browse files Browse the repository at this point in the history
  • Loading branch information
gentlementlegen committed Oct 13, 2024
1 parent 8b09fee commit d2eb90f
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 34 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/update-configuration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
permissions: write-all

steps:
- uses: Meniole/action-deploy-plugin@main
- uses: ubiquity-os/action-deploy-plugin@main
env:
app-id: ${{ secrets.APP_ID }}
app-private-key: ${{ secrets.APP_PRIVATE_KEY }}
51 changes: 19 additions & 32 deletions src/parser/content-evaluator-module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,39 +180,26 @@ export class ContentEvaluatorModule implements Module {
allComments: AllComments,
prComments: PrCommentToEvaluate[]
): Promise<Relevances> {
return Promise.resolve(
(() => {
const relevance: { [k: string]: number } = {};
comments.forEach((comment) => {
relevance[`${comment.id}`] = 0.8;
});
prComments.forEach((comment) => {
relevance[`${comment.id}`] = 0.7;
});
return relevance;
})()
);
let commentRelevances: Relevances = {};
let prCommentRelevances: Relevances = {};

if (comments.length) {
const dummyResponse = JSON.stringify(this._generateDummyResponse(comments), null, 2);
const maxTokens = this._calculateMaxTokens(dummyResponse);

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

if (prComments.length) {
const dummyResponse = JSON.stringify(this._generateDummyResponse(prComments), null, 2);
const maxTokens = this._calculateMaxTokens(dummyResponse);

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

// let commentRelevances: Relevances = {};
// let prCommentRelevances: Relevances = {};
//
// if (comments.length) {
// const dummyResponse = JSON.stringify(this._generateDummyResponse(comments), null, 2);
// const maxTokens = this._calculateMaxTokens(dummyResponse);
//
// const promptForComments = this._generatePromptForComments(specification, comments, allComments);
// commentRelevances = await this._submitPrompt(promptForComments, maxTokens);
// }
//
// if (prComments.length) {
// const dummyResponse = JSON.stringify(this._generateDummyResponse(prComments), null, 2);
// const maxTokens = this._calculateMaxTokens(dummyResponse);
//
// const promptForPrComments = this._generatePromptForPrComments(specification, prComments);
// prCommentRelevances = await this._submitPrompt(promptForPrComments, maxTokens);
// }
//
// return { ...commentRelevances, ...prCommentRelevances };
return { ...commentRelevances, ...prCommentRelevances };
}

async _submitPrompt(prompt: string, maxTokens: number): Promise<Relevances> {
Expand Down
1 change: 0 additions & 1 deletion src/parser/permit-generation-module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,6 @@ export class PermitGenerationModule implements Module {
githubContextRepositoryId: number,
env: EnvConfigType
): Promise<boolean> {
return true;
// decrypt private key
const privateKeyDecrypted = await decrypt(privateKeyEncrypted, env.X25519_PRIVATE_KEY);

Expand Down

0 comments on commit d2eb90f

Please sign in to comment.