discourse-ai/lib/completions
Sam ab5edae121
FIX: make AI helper more robust (#1484)
* FIX: make AI helper more robust

- If JSON is broken for structured output then lean on a more forgiving parser
- Gemini 2.5 flash does not support temp, support opting out
- Evals for assistant were broken, fix interface
- Add some missing LLMs
- Translator was not mapped correctly to the feature - fix that
- Don't mix XML in prompt for translator

* lint

* correct logic

* simplify code

* implement best effort json parsing direct in the structured output object
2025-07-04 14:47:11 +10:00
..
dialects DEV: Move tokenizers to a gem (#1481) 2025-07-02 14:43:03 -03:00
endpoints FIX: make AI helper more robust (#1484) 2025-07-04 14:47:11 +10:00
anthropic_message_processor.rb DEV: Use structured responses for summaries (#1252) 2025-05-06 10:09:39 -03:00
cancel_manager.rb FEATURE: forum researcher persona for deep research (#1313) 2025-05-14 12:36:16 +10:00
json_stream_decoder.rb FEATURE: improve tool support (#904) 2024-11-12 08:14:30 +11:00
json_streaming_parser.rb FIX: make AI helper more robust (#1484) 2025-07-04 14:47:11 +10:00
json_streaming_tracker.rb FIX: Don't check for #blank? when manipulating chunks (#1428) 2025-06-11 20:38:58 -03:00
llm.rb DEV: Move tokenizers to a gem (#1481) 2025-07-02 14:43:03 -03:00
nova_message_processor.rb DEV: Use structured responses for summaries (#1252) 2025-05-06 10:09:39 -03:00
open_ai_message_processor.rb DEV: Use structured responses for summaries (#1252) 2025-05-06 10:09:39 -03:00
open_ai_responses_message_processor.rb FEATURE: optionally support OpenAI responses API (#1423) 2025-06-11 17:12:25 +10:00
prompt.rb FIX: Strip uploads from msg when searching for rag fragments (#1475) 2025-06-30 15:03:17 -03:00
prompt_messages_builder.rb FEATURE: forum researcher persona for deep research (#1313) 2025-05-14 12:36:16 +10:00
report.rb FEATURE: Allow for persona & llm selection in bot conversations page (#1276) 2025-04-24 11:17:24 -05:00
structured_output.rb FIX: make AI helper more robust (#1484) 2025-07-04 14:47:11 +10:00
thinking.rb FEATURE: implement thinking token support (#1155) 2025-03-04 12:22:30 +11:00
tool_call.rb FEATURE: AI artifacts (#898) 2024-11-19 09:22:39 +11:00
tool_definition.rb DEV: use a proper object for tool definition (#1337) 2025-05-15 17:32:39 +10:00
upload_encoder.rb FEATURE: enforce jpg/png for all images (#1309) 2025-05-05 17:46:37 +10:00
xml_tag_stripper.rb FIX: display search correctly, bug when stripping XML (#668) 2024-06-14 15:28:40 +10:00
xml_tool_processor.rb DEV: use a proper object for tool definition (#1337) 2025-05-15 17:32:39 +10:00