-
Notifications
You must be signed in to change notification settings - Fork 15.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
get_openai_callback total_cost BROKEN #6193
Comments
What LLM are you using? The code snippet doesn't indicate, but this snippet works if I say
|
@vowelparrot
I tested if you leave llm = ChatOpenAI() it works! |
Looks like we don't have the cost mapping for that model name yet |
|
Hi, @matias-biatoz! I'm Dosu, and I'm here to help the LangChain team manage their backlog. I wanted to let you know that we are marking this issue as stale. From what I understand, you reported an issue where the "total_cost" is always 0 when using the "llm.generate" function with the "get_openai_callback" in the provided code snippet. Vowelparrot suggested using the "llm = ChatOpenAI()" instead of specifying parameters to make it work. They also mentioned that there is no cost mapping for the model name "gpt-3.5-turbo-0613" yet and provided a list of model names and their corresponding costs. Before we close this issue, we wanted to check with you if it is still relevant to the latest version of the LangChain repository. If it is, please let us know by commenting on this issue. Otherwise, feel free to close the issue yourself, or it will be automatically closed in 7 days. Thank you for your contribution, and we appreciate your understanding as we work to manage our backlog effectively. Let us know if you have any further questions or concerns! Best regards, |
System Info
Basically, when using "llm.generate" in combination with get_openai_callback the total_cost just outputs 0.
Code Snippet
Who can help?
@agola11 It's a Callback Issue. (That's why I am tagging you)
Information
Related Components
Reproduction
The text was updated successfully, but these errors were encountered: