feat: support cohere (close #195)

This commit is contained in:
CaIon
2024-04-24 18:49:56 +08:00
parent 3f448ba4fc
commit bfcaccc2e3
11 changed files with 322 additions and 2 deletions

View File

@@ -43,6 +43,10 @@ type OpenAIFunction struct {
Parameters any `json:"parameters,omitempty"`
}
func (r GeneralOpenAIRequest) GetMaxTokens() int64 {
return int64(r.MaxTokens)
}
func (r GeneralOpenAIRequest) ParseInput() []string {
if r.Input == nil {
return nil