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
pull/21785/head
Marco Lamina 2 weeks ago committed by GitHub
parent 4231cf0696
commit d0fae6cd54
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -6,6 +6,12 @@ from langchain_core.callbacks import BaseCallbackHandler
from langchain_core.outputs import LLMResult
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": 0.03,
"gpt-4-0314": 0.03,

Loading…
Cancel
Save