fix: update environment configuration for debugging and logging, enhance SQLite FTS5 table management, and improve API base URL handling
This commit is contained in:
@@ -46,12 +46,13 @@ type PipelineRequest struct {
|
||||
ChatModelSupportsVision bool `json:"-"`
|
||||
|
||||
// Misc request-scoped config
|
||||
TenantID uint64 `json:"-"`
|
||||
WebSearchEnabled bool `json:"-"`
|
||||
WebSearchProviderID string `json:"-"` // Resolved from agent config or tenant default
|
||||
WebFetchEnabled bool `json:"-"` // Auto-fetch full page content for web search results after rerank
|
||||
WebFetchTopN int `json:"-"` // Max pages to fetch (default 3)
|
||||
Language string `json:"-"`
|
||||
TenantID uint64 `json:"-"`
|
||||
WebSearchEnabled bool `json:"-"`
|
||||
WebSearchProviderID string `json:"-"` // Resolved from agent config or tenant default
|
||||
WebSearchMaxResults int `json:"-"` // Resolved from agent config or tenant default
|
||||
WebFetchEnabled bool `json:"-"` // Auto-fetch full page content for web search results after rerank
|
||||
WebFetchTopN int `json:"-"` // Max pages to fetch (default 3)
|
||||
Language string `json:"-"`
|
||||
}
|
||||
|
||||
// QueryIntent represents the classified intent of a user query.
|
||||
@@ -187,9 +188,10 @@ func (c *ChatManage) Clone() *ChatManage {
|
||||
ChatModelSupportsVision: c.ChatModelSupportsVision,
|
||||
TenantID: c.TenantID,
|
||||
WebSearchEnabled: c.WebSearchEnabled,
|
||||
WebSearchProviderID: c.WebSearchProviderID,
|
||||
WebFetchEnabled: c.WebFetchEnabled,
|
||||
WebFetchTopN: c.WebFetchTopN,
|
||||
WebSearchProviderID: c.WebSearchProviderID,
|
||||
WebSearchMaxResults: c.WebSearchMaxResults,
|
||||
WebFetchEnabled: c.WebFetchEnabled,
|
||||
WebFetchTopN: c.WebFetchTopN,
|
||||
Language: c.Language,
|
||||
},
|
||||
PipelineState: PipelineState{
|
||||
|
||||
+18
-3
@@ -12,9 +12,24 @@ type JSON json.RawMessage
|
||||
|
||||
// Scan implements the sql.Scanner interface.
|
||||
func (j *JSON) Scan(value interface{}) error {
|
||||
bytes, ok := value.([]byte)
|
||||
if !ok {
|
||||
return errors.New("type assertion to []byte failed")
|
||||
if value == nil {
|
||||
*j = nil
|
||||
return nil
|
||||
}
|
||||
|
||||
var bytes []byte
|
||||
switch v := value.(type) {
|
||||
case []byte:
|
||||
bytes = v
|
||||
case string:
|
||||
bytes = []byte(v)
|
||||
default:
|
||||
return errors.New("type assertion to []byte or string failed")
|
||||
}
|
||||
|
||||
if len(bytes) == 0 {
|
||||
*j = nil
|
||||
return nil
|
||||
}
|
||||
|
||||
result := json.RawMessage{}
|
||||
|
||||
Reference in New Issue
Block a user