mirror of
https://github.com/cloudstack-llc/llm-cost.git
synced 2026-07-19 20:33:33 -04:00
Add text-embedding-ada-002
This commit is contained in:
@@ -153,6 +153,20 @@
|
||||
"litellm_provider": "text-completion-openai",
|
||||
"mode": "completion"
|
||||
},
|
||||
"text-embedding-ada-002-v2": {
|
||||
"max_tokens": 8191,
|
||||
"input_cost_per_token": 0.0000001,
|
||||
"output_cost_per_token": 0.0000001,
|
||||
"litellm_provider": "text-completion-openai",
|
||||
"mode": "completion"
|
||||
},
|
||||
"text-embedding-ada-002": {
|
||||
"max_tokens": 8191,
|
||||
"input_cost_per_token": 0.0000001,
|
||||
"output_cost_per_token": 0.0000001,
|
||||
"litellm_provider": "text-completion-openai",
|
||||
"mode": "completion"
|
||||
},
|
||||
"text-ada-001": {
|
||||
"max_tokens": 2049,
|
||||
"input_cost_per_token": 0.0000004,
|
||||
|
||||
@@ -27,4 +27,13 @@ describe("estimateCost", () => {
|
||||
})
|
||||
).toBe(0.216);
|
||||
});
|
||||
|
||||
it("should estimate cost correctly for embeddings model", () => {
|
||||
expect(
|
||||
estimateCost({
|
||||
model: "text-embedding-ada-002",
|
||||
inputTokens: 3000,
|
||||
})
|
||||
).toBe(0.0003);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user