Versions in this module Expand all Collapse all v0 v0.1.0 Sep 11, 2024 Changes in this version + func ParseReplyMessages(input string) ([]replyMessage, error) + type ChatCompletionChunk struct + Choices []StreamingChoice + Created int64 + ID string + Model string + Object string + type ChatStats struct + Data struct{ ... } + type ErrorResponse struct + Err ErrorResponseContent + func (err ErrorResponse) Error() string + type ErrorResponseContent struct + Code int + Message string + type Message struct + Content string + Role string + type Model struct + Id string + type Modelz struct + Data []Model + type OpenrouterApi struct + func NewOpenrouterApi(apiKey string) *OpenrouterApi + func (OpenrouterApi) GetModels() ([]Model, error) + func (api OpenrouterApi) GetChatStats(chatId string) (ChatStats, error) + func (api OpenrouterApi) GetCompletions(model string, messages []Message, resultWriter io.Writer) error + type Provider struct + RequireParameters bool + type RequestBody struct + Messages []Message + Model string + ResponseFormat ResponseFormat + Stream bool + type ResponseFormat struct + Type string + type SkippedMalformedLine struct + func (SkippedMalformedLine) Error() string + type StreamingChoice struct + Delta StreamingChoiceDelta + FinishReason *string + Index int + type StreamingChoiceDelta struct + Content string + Role string v0.1.0-1 Sep 12, 2024