mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-09-17 01:06:37 +08:00
fix: fix Debugf not using DebugEnabled (close #2068)
This commit is contained in:
parent
c96895e35b
commit
07808122a6
@ -93,6 +93,9 @@ func Error(ctx context.Context, msg string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func Debugf(ctx context.Context, format string, a ...any) {
|
func Debugf(ctx context.Context, format string, a ...any) {
|
||||||
|
if !config.DebugEnabled {
|
||||||
|
return
|
||||||
|
}
|
||||||
logHelper(ctx, loggerDEBUG, fmt.Sprintf(format, a...))
|
logHelper(ctx, loggerDEBUG, fmt.Sprintf(format, a...))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
package model
|
package model
|
||||||
|
|
||||||
type Message struct {
|
type Message struct {
|
||||||
Role string `json:"role,omitempty"`
|
Role string `json:"role,omitempty"`
|
||||||
Content any `json:"content,omitempty"`
|
Content any `json:"content,omitempty"`
|
||||||
Name *string `json:"name,omitempty"`
|
ReasoningContent any `json:"reasoning_content,omitempty"`
|
||||||
ToolCalls []Tool `json:"tool_calls,omitempty"`
|
Name *string `json:"name,omitempty"`
|
||||||
ToolCallId string `json:"tool_call_id,omitempty"`
|
ToolCalls []Tool `json:"tool_calls,omitempty"`
|
||||||
|
ToolCallId string `json:"tool_call_id,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m Message) IsStringContent() bool {
|
func (m Message) IsStringContent() bool {
|
||||||
|
Loading…
Reference in New Issue
Block a user