mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-23 07:09:31 +00:00
community: Add token cost for GPT-4o model (#21771)
Adding [token cost for the new GPT-4o model](https://openai.com/api/pricing/): * Input cost US$5.00 / 1M tokens * Output cost US$15.00 / 1M tokens
This commit is contained in:
parent
4231cf0696
commit
d0fae6cd54
@ -6,6 +6,12 @@ from langchain_core.callbacks import BaseCallbackHandler
|
|||||||
from langchain_core.outputs import LLMResult
|
from langchain_core.outputs import LLMResult
|
||||||
|
|
||||||
MODEL_COST_PER_1K_TOKENS = {
|
MODEL_COST_PER_1K_TOKENS = {
|
||||||
|
# GPT-4o input
|
||||||
|
"gpt-4o": 0.005,
|
||||||
|
"gpt-4o-2024-05-13": 0.005,
|
||||||
|
# GPT-4o output
|
||||||
|
"gpt-4o-completion": 0.015,
|
||||||
|
"gpt-4o-2024-05-13-completion": 0.015,
|
||||||
# GPT-4 input
|
# GPT-4 input
|
||||||
"gpt-4": 0.03,
|
"gpt-4": 0.03,
|
||||||
"gpt-4-0314": 0.03,
|
"gpt-4-0314": 0.03,
|
||||||
|
Loading…
Reference in New Issue
Block a user