discourse-ai/lib/completions
Sam 8b81ff45b8
FIX: switch off native tools on Anthropic Claude Opus (#659)
Native tools do not work well on Opus.

Chain of Thought prompting means it consumes enormous amounts of
tokens and has poor latency.

This commit introduce and XML stripper to remove various chain of
thought XML islands from anthropic prompts when tools are involved.

This mean Opus native tools is now functions (albeit slowly)

From local testing XML just works better now.

Also fixes enum support in Anthropic native tools
2024-06-07 10:52:01 -03:00
..
dialects FIX: switch off native tools on Anthropic Claude Opus (#659) 2024-06-07 10:52:01 -03:00
endpoints FIX: switch off native tools on Anthropic Claude Opus (#659) 2024-06-07 10:52:01 -03:00
anthropic_message_processor.rb FEATURE: anthropic function calling (#654) 2024-06-06 08:34:23 +10:00
function_call_normalizer.rb FIX: more robust function call support (#581) 2024-04-19 06:54:54 +10:00
llm.rb FEATURE: add support for all vision models (#646) 2024-05-28 10:31:15 -03:00
prompt.rb FEATURE: Add vision support to AI personas (Claude 3) (#546) 2024-03-27 14:30:11 +11:00
prompt_messages_builder.rb FEATURE: Add support for contextualizing a DM to a bot (#627) 2024-05-21 17:17:02 +10:00
upload_encoder.rb FEATURE: Add vision support to AI personas (Claude 3) (#546) 2024-03-27 14:30:11 +11:00
xml_tag_stripper.rb FIX: switch off native tools on Anthropic Claude Opus (#659) 2024-06-07 10:52:01 -03:00