Discover Packages
github.com/juzeon/poe-openai-proxy
poe
package
Version:
v0.0.0-...-2e5b136
Opens a new window with list of versions in this module.
Published: Aug 2, 2023
License: GPL-3.0
Opens a new window with license information.
Imports: 7
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
type Choice struct {
Index int `json:"index"`
Message Message `json:"message"`
FinishReason string `json:"finish_reason"`
}
type CompletionRequest struct {
Model string `json:"model"`
Messages []Message `json:"messages"`
Stream bool `json:"stream"`
}
type CompletionResponse struct {
ID string `json:"id"`
Object string `json:"object"`
Created int `json:"created"`
Choices []Choice `json:"choices"`
Usage Usage `json:"usage"`
}
type CompletionSSEResponse struct {
Choices []SSEChoice `json:"choices"`
Created int64 `json:"created"`
Id string `json:"id"`
Model string `json:"model"`
Object string `json:"object"`
}
type Delta struct {
Role string `json:"role"`
Content string `json:"content"`
}
type Message struct {
Role string `json:"role"`
Content string `json:"content"`
Name string `json:"name"`
}
type SSEChoice struct {
Delta map[string ]string `json:"delta"`
FinishReason *string `json:"finish_reason"`
Index int `json:"index"`
}
type Usage struct {
PromptTokens int `json:"prompt_tokens"`
CompletionTokens int `json:"completion_tokens"`
TotalTokens int `json:"total_tokens"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.