mirror of
https://github.com/memohai/Memoh.git
synced 2026-04-27 07:16:19 +09:00
fix(agent): skip tools for models without tool-call capability and parse image output
- Add SupportsToolCall to RunConfig; only inject tools into SDK when set - Update twilight-ai to 497ad09 which adds SSE scanner 10MB buffer (fixes token-too-long on large image payloads) and parses the images array from OpenAI-compatible chat completions into StreamFilePart
This commit is contained in:
@@ -31,12 +31,13 @@ func (s *SpawnAdapter) Generate(ctx context.Context, cfg tools.SpawnRunConfig) (
|
||||
}
|
||||
|
||||
rc := RunConfig{
|
||||
Model: cfg.Model,
|
||||
System: cfg.System,
|
||||
Query: cfg.Query,
|
||||
SessionType: cfg.SessionType,
|
||||
Messages: messages,
|
||||
ReasoningEffort: cfg.ReasoningEffort,
|
||||
Model: cfg.Model,
|
||||
System: cfg.System,
|
||||
Query: cfg.Query,
|
||||
SessionType: cfg.SessionType,
|
||||
Messages: messages,
|
||||
ReasoningEffort: cfg.ReasoningEffort,
|
||||
SupportsToolCall: true,
|
||||
Identity: SessionContext{
|
||||
BotID: cfg.Identity.BotID,
|
||||
ChatID: cfg.Identity.ChatID,
|
||||
|
||||
Reference in New Issue
Block a user