discourse-ai/app/models
Roman Rizzi 4f1a3effe0
REFACTOR: Migrate Vllm/TGI-served models to the OpenAI format. (#588)
Both endpoints provide OpenAI-compatible servers. The only difference is that Vllm doesn't support passing tools as a separate parameter. Even if the tool param is supported, it ultimately relies on the model's ability to handle native functions, which is not the case with the models we have today.

As a part of this change, we are dropping support for StableBeluga/Llama2 models. They don't have a chat_template, meaning the new API can translate them.

These changes let us remove some of our existing dialects and are a first step in our plan to support any LLM by defining them as data-driven concepts.

 I rewrote the "translate" method to use a template method and extracted the tool support strategies into its classes to simplify the code.

Finally, these changes bring support for Ollama when running in dev mode. It only works with Mistral for now, but it will change soon..
2024-05-07 10:02:16 -03:00
..
ai_api_audit_log.rb REFACTOR: Migrate Vllm/TGI-served models to the OpenAI format. (#588) 2024-05-07 10:02:16 -03:00
ai_persona.rb FEATURE: support Chat with AI Persona via a DM (#488) 2024-05-06 09:49:02 +10:00
chat_message_custom_prompt.rb FEATURE: support Chat with AI Persona via a DM (#488) 2024-05-06 09:49:02 +10:00
classification_result.rb DEV: Dedicated table for saving classification results (#1) 2023-02-27 16:21:40 -03:00
completion_prompt.rb DEV: correct flaky spec (#475) 2024-02-19 15:21:55 +11:00
model_accuracy.rb REFACTOR: Store prompts in a dedicated table. (#14) 2023-03-17 15:14:19 -03:00
post_custom_prompt.rb FEATURE: AI Bot RAG support. (#537) 2024-04-01 13:43:34 -03:00
rag_document_fragment.rb UX: Display the indexing progress for RAG uploads (#557) 2024-04-09 11:03:07 -03:00
reviewable_ai_chat_message.rb FIX: 500 error when reviewable has a missing message (#397) 2024-01-03 11:49:47 -03:00
reviewable_ai_post.rb REFACTOR: Store prompts in a dedicated table. (#14) 2023-03-17 15:14:19 -03:00
shared_ai_conversation.rb FIX: Secure/unsecure uploads when sharing AI conversations (#554) 2024-04-11 10:00:41 +10:00