Documentation
¶
Overview ¶
Copyright 2025 National Technology and Engineering Solutions of Sandia SPDX-License-Identifier: BSD-3-Clause
Copyright 2025 National Technology and Engineering Solutions of Sandia SPDX-License-Identifier: BSD-3-Clause
Copyright 2025 National Technology and Engineering Solutions of Sandia SPDX-License-Identifier: BSD-3-Clause
Index ¶
Constants ¶
View Source
const ( RoleUser string = "user" RoleAssistant string = "assistant" )
Variables ¶
This section is empty.
Functions ¶
func Temperature ¶
Types ¶
type ChatRequest ¶
type ChatRequest struct {
Model string `json:"model"`
Messages []Message `json:"messages"`
ResponseFormat *ResponseFormat `json:"response_format,omitempty"`
Temperature *float64 `json:"temperature,omitempty"`
}
type ChatResponse ¶
type ChatResponse struct {
Choices []Choice `json:"choices"`
}
func (*ChatResponse) GetChoiceZero ¶ added in v0.3.0
func (r *ChatResponse) GetChoiceZero() ([]byte, error)
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) Chat ¶
func (c *Client) Chat(req *ChatRequest) (*ChatResponse, error)
func (*Client) ChatGetChoiceZero ¶ added in v0.3.0
func (c *Client) ChatGetChoiceZero(req *ChatRequest) ([]byte, error)
type ClientOpt ¶
type ClientOpt func(*Client)
func WithAuditDir ¶ added in v0.3.0
func WithAuditEnabled ¶ added in v0.3.0
func WithBaseUrl ¶
func WithTimeout ¶
type ResponseFormat ¶
func NewResponseFormat ¶
func NewResponseFormat(schema any) *ResponseFormat
Click to show internal directories.
Click to hide internal directories.