feat: enhance request handling with pass-through options and system prompt support

This commit is contained in:
CaIon
2025-07-26 11:39:09 +08:00
parent d6cbf43373
commit 1297addfb1
10 changed files with 417 additions and 70 deletions

View File

@@ -73,6 +73,15 @@ func (r *GeneralOpenAIRequest) ToMap() map[string]any {
return result
}
func (r *GeneralOpenAIRequest) GetSystemRoleName() string {
if strings.HasPrefix(r.Model, "o") {
if !strings.HasPrefix(r.Model, "o1-mini") && !strings.HasPrefix(r.Model, "o1-preview") {
return "developer"
}
}
return "system"
}
type ToolCallRequest struct {
ID string `json:"id,omitempty"`
Type string `json:"type"`