ChatCompletionMessage represents a message structure for chat completion API.
| 38 | |
| 39 | // ChatCompletionMessage represents a message structure for chat completion API. |
| 40 | type ChatCompletionMessage struct { |
| 41 | Role string `json:"role"` |
| 42 | Content string `json:"content"` |
| 43 | |
| 44 | // This property isn't in the official documentation, but it's in |
| 45 | // the documentation for the official library for python: |
| 46 | // - https://github.com/openai/openai-python/blob/main/chatml.md |
| 47 | // - https://github.com/openai/openai-cookbook/blob/main/examples/How_to_count_tokens_with_tiktoken.ipynb |
| 48 | Name string `json:"name,omitempty"` |
| 49 | } |
| 50 | |
| 51 | // ChatCompletionResponse represents a response structure for chat completion API. |
| 52 | type ChatCompletionResponse struct { |
nothing calls this directly
no outgoing calls
no test coverage detected