discourse-ai/spec/lib/modules/ai_bot/personas
Sam 823e8ef490
FEATURE: partial tool call support for OpenAI and Anthropic (#908)
Implement streaming tool call implementation for Anthropic and Open AI.

When calling:

llm.generate(..., partial_tool_calls: true) do ...
Partials may contain ToolCall instances with partial: true, These tool calls are partially populated with json partially parsed.

So for example when performing a search you may get:

ToolCall(..., {search: "hello" })
ToolCall(..., {search: "hello world" })

The library used to parse json is:

https://github.com/dgraham/json-stream

We use a fork cause we need access to the internal buffer.

This prepares internals to perform partial tool calls, but does not implement it yet.
2024-11-14 06:58:24 +11:00
..
persona_spec.rb FEATURE: partial tool call support for OpenAI and Anthropic (#908) 2024-11-14 06:58:24 +11:00
researcher_spec.rb FEATURE: web browsing tool (#548) 2024-03-28 16:01:58 +11:00
settings_explorer_spec.rb DEV: AI bot migration to the Llm pattern. (#343) 2024-01-04 10:44:07 -03:00
sql_helper_spec.rb DEV: AI bot migration to the Llm pattern. (#343) 2024-01-04 10:44:07 -03:00