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