-
Notifications
You must be signed in to change notification settings - Fork 374
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
Understanding the question/answering process and its costs #24
Comments
I also made 2 trials which costed 0.8$ (~ 0.4$ per question). |
Exactly the same experience for me. |
Answering my own question: here is a commit which does the intended replacement |
Weights and Biases also released it Prompts feature that supports langchain integration. https://docs.wandb.ai/guides/prompts/quickstart Think it might be really helpful if you wanna try. |
Can someone explain to me what the process is behind the scenes when calling the OpenAI API?
I understand how embedding works (#1). But how much text from the embedding is included in following requests? And why there are for example 2 requests for one question or even 5 when using ChatOpenAI?
Example:
I tried simple question (in Czech because my embeddings are in Czech) "How old must the camp leader be at least?". The chain made two API calls with 5565 tokens in total. And the response was "The minimum age for the camp leader is 18 according to Junák – český skaut." It's not very cost effective when using
text-davinci
. For one simple question I pay around 0,11 USD.I simply tried replace
OpenAI()
withChatOpenAI()
which usesgpt-3.5-turbo-0301
. The chain made 5 requests (4,643 prompt + 278 completion = 4,921 tokens). The price is 10x lower and also less tokens are used.Is it possible to affect how long "embeddings" will be included in the request?
Thanks for any information.
The text was updated successfully, but these errors were encountered: