Skip to content

Commit

Permalink
chore: remove useless
Browse files Browse the repository at this point in the history
  • Loading branch information
HuberTRoy committed Dec 19, 2024
1 parent d553cf8 commit c5fafa1
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions src/runners/openai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,6 @@ import { Context } from "../context/context.ts";
import { getLogger } from "../logger.ts";

const logger = await getLogger("runner:openai");

const dimensionsDict: { [key in string]: number } = {
"text-embedding-3-large": 3072,
"text-embedding-3-small": 1536,
"text-embedding-ada-002": 1536,
};

export class OpenAIRunnerFactory implements IRunnerFactory {
#openai: OpenAI;
#sandbox: ISandbox;
Expand Down Expand Up @@ -66,10 +59,6 @@ export class OpenAIRunnerFactory implements IRunnerFactory {
const res = await this.#openai.embeddings.create({
model: this.#sandbox.manifest.embeddingsModel ?? "text-embedding-3-small",
input,
dimensions:
dimensionsDict[
this.#sandbox.manifest.embeddingsModel ?? "text-embedding-3-small"
] || 1536,
});

return res.data[0].embedding;
Expand Down

0 comments on commit c5fafa1

Please sign in to comment.