Based on QuantumNous/new-api v1.0.0-rc.36 (shallow history squashed). - CNY quota display mode: RMB-denominated top-up and crediting across Epay/Waffo channels - New CheckinButton in both authenticated and public headers (Turnstile supported) - New /subscribe page with public plan snapshot, Alipay/balance payment, auto group upgrade/reset - New /docs 12-section beginner guide with anchor navigation - New home PromoBanner linking to /docs; i18n synced (en/zh/zh-TW/fr/ja/ru/vi) - README: document custom features, live demo https://ai.88531.cn
39 lines
975 B
Go
39 lines
975 B
Go
package palm
|
|
|
|
import "github.com/QuantumNous/new-api/relaykit/dto"
|
|
|
|
type PaLMChatMessage struct {
|
|
Author string `json:"author"`
|
|
Content string `json:"content"`
|
|
}
|
|
|
|
type PaLMFilter struct {
|
|
Reason string `json:"reason"`
|
|
Message string `json:"message"`
|
|
}
|
|
|
|
type PaLMPrompt struct {
|
|
Messages []PaLMChatMessage `json:"messages"`
|
|
}
|
|
|
|
type PaLMChatRequest struct {
|
|
Prompt PaLMPrompt `json:"prompt"`
|
|
Temperature *float64 `json:"temperature,omitempty"`
|
|
CandidateCount int `json:"candidateCount,omitempty"`
|
|
TopP float64 `json:"topP,omitempty"`
|
|
TopK uint `json:"topK,omitempty"`
|
|
}
|
|
|
|
type PaLMError struct {
|
|
Code int `json:"code"`
|
|
Message string `json:"message"`
|
|
Status string `json:"status"`
|
|
}
|
|
|
|
type PaLMChatResponse struct {
|
|
Candidates []PaLMChatMessage `json:"candidates"`
|
|
Messages []dto.Message `json:"messages"`
|
|
Filters []PaLMFilter `json:"filters"`
|
|
Error PaLMError `json:"error"`
|
|
}
|