discourse-ai/lib/ai_bot
Sam e817b7dc11
FEATURE: improve tool support (#904)
This re-implements tool support in DiscourseAi::Completions::Llm #generate

Previously tool support was always returned via XML and it would be the responsibility of the caller to parse XML

New implementation has the endpoints return ToolCall objects.

Additionally this simplifies the Llm endpoint interface and gives it more clarity. Llms must implement

decode, decode_chunk (for streaming)

It is the implementers responsibility to figure out how to decode chunks, base no longer implements. To make this easy we ship a flexible json decoder which is easy to wire up.

Also (new)

    Better debugging for PMs, we now have a next / previous button to see all the Llm messages associated with a PM
    Token accounting is fixed for vllm (we were not correctly counting tokens)
2024-11-12 08:14:30 +11:00
..
personas FEATURE: improve tool support (#904) 2024-11-12 08:14:30 +11:00
tools FIX: encode parameters returned from LLMs correctly (#889) 2024-11-04 10:07:17 +11:00
bot.rb FEATURE: improve tool support (#904) 2024-11-12 08:14:30 +11:00
entry_point.rb FEATURE: new endpoint for directly accessing a persona (#876) 2024-10-30 10:28:20 +11:00
playground.rb FEATURE: support custom instructions for persona streaming (#890) 2024-11-05 07:43:26 +11:00
question_consolidator.rb FEATURE: GPT4o support and better auditing (#618) 2024-05-14 13:28:46 +10:00
response_http_streamer.rb FEATURE: support custom instructions for persona streaming (#890) 2024-11-05 07:43:26 +11:00
site_settings_extension.rb DEV: Rewire AI bot internals to use LlmModel (#638) 2024-06-18 14:32:14 -03:00
tool_runner.rb FIX: encode parameters returned from LLMs correctly (#889) 2024-11-04 10:07:17 +11:00