Migrate LLM client to OpenAI SDK and implement WebUI-specific fileID handling
This commit is contained in:
@@ -207,6 +207,9 @@ func runMessageChannel(ctx context.Context, cfg config.Config, engine *agent.Orc
|
||||
return wb.Run(
|
||||
ctx,
|
||||
func(ctx context.Context, msg webui.IncomingMessage) (string, error) {
|
||||
if len(msg.FileIDs) > 0 {
|
||||
return engine.HandleMessageWithFileIDs(ctx, msg.ChatID, msg.UserID, msg.Text, msg.FileIDs)
|
||||
}
|
||||
return engine.HandleMessage(ctx, msg.ChatID, msg.UserID, msg.Text)
|
||||
},
|
||||
func(ctx context.Context, chatID, userID string, files []llm.InputFile) ([]string, error) {
|
||||
|
||||
Reference in New Issue
Block a user