Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var APIEndpointData []APIEndpoint
APIEndpointData is populated from init() with data loaded from the embedded JSON file
Functions ¶
func NewOpenAIChatCompletionRequest ¶
func NewOpenAIChatCompletionRequest(body *string) (completion *openai.ChatCompletionRequest, err error)
NewOpenAIChatCompletionRequest creates a new OpenAI ChatCompletion Request object from a JSON string
func NewOpenAIChatCompletionResponse ¶
func NewOpenAIChatCompletionResponse(body *string) (completion *openai.ChatCompletionResponse, err error)
NewOpenAIChatCompletionResponse creates a new OpenAI ChatCompletion Response object from a JSON string
Types ¶
type APIEndpoint ¶
APIEndpoint represents the pricing data for a single API endpoint, such as "https://api.openai.com/v1/chat/completions"
type Product ¶
type Product struct {
Name string `json:"name"`
InputTokenCost string `json:"inputTokenCost"`
OutputTokenCost string `json:"outputTokenCost"`
Currency string `json:"currency"`
Description string `json:"description,omitempty"`
}
Product represents a model or other product attached to an endpoint
Click to show internal directories.
Click to hide internal directories.