MCPcopy Create free account
hub / github.com/coderabbit214/document-ai / ChatCompletionMessage

Struct ChatCompletionMessage

pkg/openai/chat.go:40–49  ·  view source on GitHub ↗

ChatCompletionMessage represents a message structure for chat completion API.

Source from the content-addressed store, hash-verified

38
39// ChatCompletionMessage represents a message structure for chat completion API.
40type 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.
52type ChatCompletionResponse struct {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected