discourse-ai/spec/lib/modules/ai_bot/commands
Sam 181113159b
FIX: setting explorer was exceeding token budget
This refactor changes it so we only include minimal data in the
system prompt which leaves us lots of tokens for specific searches

The new search command allows us to pull in settings on demand

Descriptions are include in short search results, and names only
in longer results

Also: 

* In dev it is important to tell when calls are made to open ai
this adds a console log to increase awareness around token usage

* PERF: stop counting tokens so often

This changes it so we only count tokens once per response

Previously each time we heard back from open ai we would count
tokens, leading to uneeded delays

* bug fix, commands may reach in for tokenizer

* add logging to console for anthropic calls as well

* Update lib/shared/inference/openai_completions.rb

Co-authored-by: Martin Brennan <mjrbrennan@gmail.com>
2023-09-01 11:48:51 +10:00
..
categories_command_spec.rb FEATURE: basic progress for image generation (#133) 2023-08-14 16:30:12 +10:00
command_spec.rb FEATURE: basic progress for image generation (#133) 2023-08-14 16:30:12 +10:00
db_schema_command_spec.rb FEATURE: add initial support for personas (#172) 2023-08-30 16:15:03 +10:00
google_command_spec.rb FEATURE: basic progress for image generation (#133) 2023-08-14 16:30:12 +10:00
image_command_spec.rb FEATURE: basic progress for image generation (#133) 2023-08-14 16:30:12 +10:00
read_command_spec.rb FEATURE: basic progress for image generation (#133) 2023-08-14 16:30:12 +10:00
search_command_spec.rb FEATURE: add setting_context experimental command (#160) 2023-08-29 10:43:58 +10:00
search_settings_command_spec.rb FIX: setting explorer was exceeding token budget 2023-09-01 11:48:51 +10:00
setting_context_command.rb FEATURE: add setting_context experimental command (#160) 2023-08-29 10:43:58 +10:00
summarize_command_spec.rb FEATURE: basic progress for image generation (#133) 2023-08-14 16:30:12 +10:00
tags_command_spec.rb FEATURE: basic progress for image generation (#133) 2023-08-14 16:30:12 +10:00
time_command_spec.rb FEATURE: basic progress for image generation (#133) 2023-08-14 16:30:12 +10:00