Logo
Explore Help
Sign In
discourse/discourse-ai
1
0
Fork 0
You've already forked discourse-ai
mirror of https://github.com/discourse/discourse-ai.git synced 2025-07-08 23:32:45 +00:00
Code Issues Packages Projects Releases Wiki Activity
discourse-ai/db/migrate/20240104013944_add_params_to_completion_prompt.rb

9 lines
252 B
Ruby
Raw Permalink Normal View History

FIX: AI helper not working correctly with mixtral (#399) * FIX: AI helper not working correctly with mixtral This PR introduces a new function on the generic llm called #generate This will replace the implementation of completion! #generate introduces a new way to pass temperature, max_tokens and stop_sequences Then LLM implementers need to implement #normalize_model_params to ensure the generic names match the LLM specific endpoint This also adds temperature and stop_sequences to completion_prompts this allows for much more robust completion prompts * port everything over to #generate * Fix translation - On anthropic this no longer throws random "This is your translation:" - On mixtral this actually works * fix markdown table generation as well
2024-01-04 23:53:47 +11:00
# frozen_string_literal: true
class AddParamsToCompletionPrompt < ActiveRecord::Migration[7.0]
def change
add_column :completion_prompts, :temperature, :integer
add_column :completion_prompts, :stop_sequences, :string, array: true
end
end
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.8 Page: 78ms Template: 3ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API