go-openai
go-openai copied to clipboard
OpenAI ChatGPT, GPT-3, GPT-4, DALL·E, Whisper API wrapper for Go
https://github.com/sashabaranov/go-openai/blob/master/chat_stream.go#L22 ```go type ChatCompletionStreamResponse struct { ID string `json:"id"` Object string `json:"object"` Created int64 `json:"created"` Model string `json:"model"` Choices []ChatCompletionStreamChoice `json:"choices"` PromptAnnotations []PromptAnnotation `json:"prompt_annotations,omitempty"` Usage Usage `json:"usage"` } // ChatCompletionStream...
**Describe the change** An example for vision-preview that might be helpful for others. Example is taken from the python version provided below. **Provide OpenAI documentation link** https://platform.openai.com/docs/guides/vision/visions
Could someone please provide me with an example of the go language version using function call to call the api,i donn't know how to do that
Your issue may already be reported! Please search on the [issue tracker](https://github.com/sashabaranov/go-openai/issues) before creating one. **Is your feature request related to a problem? Please describe.** I'm trying to add an...
**Describe the change** This PR adds support for querying daily costs usage information (the same as shown on https://platform.openai.com/usage). **Describe your solution** The implementation uses the public endpoint available at...
"usage": { "prompt_tokens": xxx, "completion_tokens": xxx, "total_tokens": xxx }
[Text to speech](https://platform.openai.com/docs/guides/text-to-speech/text-to-speech)
Please provide support for the gpt-4-vision-preview model. The ChatCompletionMessage is currently not useful for gpt-4-vision-preview.
**Is your feature request related to a problem? Please describe.** Many OpenAI alternatives (such as [anyscale](https://www.anyscale.com/blog/anyscale-endpoints-json-mode-and-function-calling-features)) currently support `response_format.schema` in ChatCompletion request. The syntax looks like ``` response_format={ "type": "json_object",...