| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- package dto
- type TextResponse struct {
- Choices []OpenAITextResponseChoice `json:"choices"`
- Usage `json:"usage"`
- Error OpenAIError `json:"error"`
- }
- type OpenAITextResponseChoice struct {
- Index int `json:"index"`
- Message `json:"message"`
- FinishReason string `json:"finish_reason"`
- }
- type OpenAITextResponse struct {
- Id string `json:"id"`
- Object string `json:"object"`
- Created int64 `json:"created"`
- Choices []OpenAITextResponseChoice `json:"choices"`
- Usage `json:"usage"`
- }
- type OpenAIEmbeddingResponseItem struct {
- Object string `json:"object"`
- Index int `json:"index"`
- Embedding []float64 `json:"embedding"`
- }
- type OpenAIEmbeddingResponse struct {
- Object string `json:"object"`
- Data []OpenAIEmbeddingResponseItem `json:"data"`
- Model string `json:"model"`
- Usage `json:"usage"`
- }
- type ImageResponse struct {
- Created int `json:"created"`
- Data []struct {
- Url string `json:"url"`
- B64Json string `json:"b64_json"`
- }
- }
- type ChatCompletionsStreamResponseChoice struct {
- Delta struct {
- Content string `json:"content"`
- } `json:"delta"`
- FinishReason *string `json:"finish_reason,omitempty"`
- }
- type ChatCompletionsStreamResponse struct {
- Id string `json:"id"`
- Object string `json:"object"`
- Created int64 `json:"created"`
- Model string `json:"model"`
- Choices []ChatCompletionsStreamResponseChoice `json:"choices"`
- }
- type ChatCompletionsStreamResponseSimple struct {
- Choices []ChatCompletionsStreamResponseChoice `json:"choices"`
- }
- type CompletionsStreamResponse struct {
- Choices []struct {
- Text string `json:"text"`
- FinishReason string `json:"finish_reason"`
- } `json:"choices"`
- }
- type MidjourneyRequest struct {
- Prompt string `json:"prompt"`
- NotifyHook string `json:"notifyHook"`
- Action string `json:"action"`
- Index int `json:"index"`
- State string `json:"state"`
- TaskId string `json:"taskId"`
- Base64Array []string `json:"base64Array"`
- Content string `json:"content"`
- }
- type MidjourneyResponse struct {
- Code int `json:"code"`
- Description string `json:"description"`
- Properties interface{} `json:"properties"`
- Result string `json:"result"`
- }
|