e817b7dc11
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) |
||
---|---|---|
.. | ||
ai_api_audit_log_serializer.rb | ||
ai_chat_channel_serializer.rb | ||
ai_custom_tool_list_serializer.rb | ||
ai_custom_tool_serializer.rb | ||
ai_tool_serializer.rb | ||
ai_topic_summary_serializer.rb | ||
llm_model_serializer.rb | ||
localized_ai_persona_serializer.rb | ||
reviewable_ai_chat_message_serializer.rb | ||
reviewable_ai_post_serializer.rb |