Versions in this module Expand all Collapse all v0 v0.0.4 Mar 22, 2025 Changes in this version + func Handler(si ServerInterface) http.Handler + func HandlerWithOptions(si ServerInterface, options StdHTTPServerOptions) http.Handler + func NewCreateChatCompletionRequest(server string, body CreateChatCompletionRequest) (*http.Request, error) + func NewCreateChatCompletionRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) + func NewCreateEmbeddingRequest(server string, body CreateEmbeddingRequest) (*http.Request, error) + func NewCreateEmbeddingRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) + type ChatCompletionMessageRole string + const ChatCompletionRoleAssistant + const ChatCompletionRoleSystem + const ChatCompletionRoleTool + const ChatCompletionRoleUser + type ChatCompletionMessageToolCall = ... + type ChatCompletionMessageToolCallType string + type ChatCompletionMessageToolCalls = []ChatCompletionMessageToolCall + type ChatCompletionRequestMessage ... + type ChatCompletionResponseMessage = ... + type ChatCompletionTool struct + Function FunctionObject + Type ChatCompletionToolType + type ChatCompletionToolType string + const Function + type Client struct + Client HttpRequestDoer + RequestEditors []RequestEditorFn + Server string + func NewClient(server string, opts ...ClientOption) (*Client, error) + func (c *Client) CreateChatCompletion(ctx context.Context, body CreateChatCompletionRequest, ...) (*http.Response, error) + func (c *Client) CreateEmbedding(ctx context.Context, body CreateEmbeddingRequest, ...) (*http.Response, error) + type ClientOption func(*Client) error + func WithHTTPClient(doer HttpRequestDoer) ClientOption + func WithRequestEditorFn(fn RequestEditorFn) ClientOption + type CreateChatCompletionRequest = ... + type CreateChatCompletionResponse = ... + type CreateEmbeddingRequest = ... + type CreateEmbeddingResponse = marshalx.Dynamic[struct{}] + type FunctionObject ... + type FunctionParameters map[string]any + type HttpRequestDoer interface + Do func(req *http.Request) (*http.Response, error) + type RequestEditorFn func(ctx context.Context, req *http.Request) error + type ServerInterface interface + CreateChatCompletion func(w http.ResponseWriter, r *http.Request) + CreateEmbedding func(w http.ResponseWriter, r *http.Request) + type ServerInterfaceWrapper struct + ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error) + Handler ServerInterface + func (siw *ServerInterfaceWrapper) CreateChatCompletion(w http.ResponseWriter, r *http.Request) + func (siw *ServerInterfaceWrapper) CreateEmbedding(w http.ResponseWriter, r *http.Request) + type StdHTTPServerOptions struct + BaseRouter *http.ServeMux + BaseURL string + ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)