You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For now, the token is part of the model not part of the Conversation. If you want to use a model with your own token you should do something like this:
OpenAI.conversation {
val chat =OpenAI(token ="your_token").DEFAULT_CHATval response = promptMessage("What is the meaning of life?, model = chat) println(response)}
There is a problem because to create OpenAI.conversation {, you call OpenAI with the token null always by default.
The second call OpenAI(token = "your_token").DEFAULT_CHAT it's okay.
It would be interesting if only one OpenAi() were created for the entire block. With Context Receivers this will be easier in the future.
OpenAI.conversation { }
When I use conversation block it always calls the env system, but I want to set the token manually.
OpenAI.conversation(here_token) { }
The problem:
This always ends up calling the environment because the token is set to null by default.
class OpenAI(internal var token: String? = null, internal var host: String? = null)
The text was updated successfully, but these errors were encountered: