-
Notifications
You must be signed in to change notification settings - Fork 168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: abstracting the creation of a vector store #47
Conversation
LOGAF Level 2 - /home/runner/work/code-review-gpt/code-review-gpt/src/common/model/AIModel.ts The API key is exposed in the code. Consider using environment variables to store sensitive information like API keys. For example, you can use LOGAF Level 3 - /home/runner/work/code-review-gpt/code-review-gpt/src/test/run/runTest.ts The function Example: try {
const { markdownReport: reviewResponse } = await askAI(prompts, modelName, false);
// rest of the code
} catch (error) {
console.error(`Failed to call AI model: ${modelName}`, error);
} LOGAF Level 2 - /home/runner/work/code-review-gpt/code-review-gpt/src/review/prompt/makeSlimmedFile.ts
Example: /**
* This function does X, Y, and Z.
*
* @param {type} paramName - description
* @returns {type} description
*/
function functionName(paramName) {
// code
} 🔑💣🔍 Powered by Code Review GPT |
Test results summary:✅ [PASS] - Test case: Bad variable name SUMMARY: ✅ PASS: 3 - Tests Powered by Code Review GPT |
import { OpenAIEmbeddings } from 'langchain/embeddings/openai'; | ||
|
||
describe('CreateMemoryStore function', () => { | ||
const initialFiles = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you make this file in the testFiles and then read it here. Makes the code a lot nicer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done :)
new OpenAIEmbeddings(), | ||
{} | ||
); | ||
expect(result).toEqual(expectedResult); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also can you check that a simularitySearchWithScore returns a number. Thats the most used method on this class.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done :)
No description provided.