File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -108192,11 +108192,11 @@ class DockerRepository {
108192108192 return false;
108193108193 }
108194108194 };
108195- this.getEmbedding = async (instruction, text ) => {
108195+ this.getEmbedding = async (textInstructionsPairs ) => {
108196108196 try {
108197108197 const request = {
108198- instruction ,
108199- text
108198+ instructions: textInstructionsPairs.map(pair => pair[0]) ,
108199+ texts: textInstructionsPairs.map(pair => pair[1])
108200108200 };
108201108201 const response = await fetch('http://localhost:8000/embed', {
108202108202 method: 'POST',
@@ -113887,7 +113887,9 @@ class VectorActionUseCase {
113887113887 const results = [];
113888113888 try {
113889113889 await this.dockerRepository.startContainer();
113890- const embedding = await this.dockerRepository.getEmbedding(this.CODE_INSTRUCTION, "function sum(a, b) { return a + b; }");
113890+ const embedding = await this.dockerRepository.getEmbedding([
113891+ [this.CODE_INSTRUCTION, "function sum(a, b) { return a + b; }"]
113892+ ]);
113891113893 (0, logger_1.logDebugInfo)(`Embedding: ${embedding}`);
113892113894 results.push(new result_1.Result({
113893113895 id: this.taskId,
You can’t perform that action at this time.
0 commit comments