feat: support cloudflare worker ai

This commit is contained in:
CalciumIon
2024-07-13 19:55:22 +08:00
parent 1086340e14
commit fe4665fd99
15 changed files with 296 additions and 28 deletions
+2 -2
View File
@@ -48,8 +48,8 @@ type StreamOptions struct {
IncludeUsage bool `json:"include_usage,omitempty"`
}
func (r GeneralOpenAIRequest) GetMaxTokens() int64 {
return int64(r.MaxTokens)
func (r GeneralOpenAIRequest) GetMaxTokens() int {
return int(r.MaxTokens)
}
func (r GeneralOpenAIRequest) ParseInput() []string {