mirror of
https://github.com/discourse/discourse-ai.git
synced 2025-02-07 20:18:16 +00:00
f6ac5cd0a8
* FEATURE: allow tuning of RAG generation - change chunking to be token based vs char based (which is more accurate) - allow control over overlap / tokens per chunk and conversation snippets inserted - UI to control new settings * improve ui a bit * fix various reindex issues * reduce concurrency * try ultra low queue ... concurrency 1 is too slow.
12 lines
545 B
Ruby
12 lines
545 B
Ruby
# frozen_string_literal: true
|
|
|
|
class AddRagParamsToAiPersona < ActiveRecord::Migration[7.0]
|
|
def change
|
|
# the default fits without any data loss in a 384 token vector representation
|
|
# larger embedding models can easily fit larger chunks so this is configurable
|
|
add_column :ai_personas, :rag_chunk_tokens, :integer, null: false, default: 374
|
|
add_column :ai_personas, :rag_chunk_overlap_tokens, :integer, null: false, default: 10
|
|
add_column :ai_personas, :rag_conversation_chunks, :integer, null: false, default: 10
|
|
end
|
|
end
|