mirror of
https://github.com/sipeed/picoclaw.git
synced 2026-06-12 18:08:54 +00:00
23 lines
492 B
Go
23 lines
492 B
Go
package httpapi
|
|
|
|
import "strings"
|
|
|
|
func extractPartThoughtSignature(thoughtSignature string, thoughtSignatureSnake string) string {
|
|
if thoughtSignature != "" {
|
|
return thoughtSignature
|
|
}
|
|
if thoughtSignatureSnake != "" {
|
|
return thoughtSignatureSnake
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func extractProtocol(model string) (protocol, modelID string) {
|
|
model = strings.TrimSpace(model)
|
|
protocol, modelID, found := strings.Cut(model, "/")
|
|
if !found {
|
|
return "openai", model
|
|
}
|
|
return protocol, modelID
|
|
}
|