discourse ai で `input must have less than 8192 tokens` が発生する警告

入力テキストをチャンクに分割するツールはありますか?
または、8192 トークンを超えるサポートがある埋め込み API はありますか?

メッセージ (15件のコピーが報告されました)

OpenAI Embeddings はステータス 413 body: {"code":20042,"message":"input must have less than 8192 tokens","data":null} で失敗しました

バックトレース

/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-8.0.3/lib/active_support/broadcast_logger.rb:218:in `block in dispatch'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-8.0.3/lib/active_support/broadcast_logger.rb:217:in `map'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-8.0.3/lib/active_support/broadcast_logger.rb:217:in `dispatch'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-8.0.3/lib/active_support/broadcast_logger.rb:129:in `warn'
/var/www/discourse/plugins/discourse-ai/lib/inference/open_ai_embeddings.rb:34:in `perform!'
/var/www/discourse/plugins/discourse-ai/lib/embeddings/vector.rb:45:in `block (2 levels) in gen_bulk_reprensentations'
/var/www/discourse/lib/scheduler/thread_pool.rb:118:in `block (2 levels) in wrap_block'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/rails_multisite-7.0.0/lib/rails_multisite/connection_management/null_instance.rb:49:in `with_connection'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/rails_multisite-7.0.0/lib/rails_multisite/connection_management.rb:17:in `with_connection'
/var/www/discourse/lib/scheduler/thread_pool.rb:118:in `block in wrap_block'
/var/www/discourse/lib/scheduler/thread_pool.rb:163:in `thread_loop'
/var/www/discourse/lib/scheduler/thread_pool.rb:174:in `block in spawn_thread'

そのモデルをセルフホストする場合、最大32kトークンまで使用できます。

それが不可能であれば、プロバイダーで許可されている最大値に制限するように埋め込みモデルを設定する必要があります。これにより、AIボットRAGはアップロードされたファイルをチャンクに分割し、関連トピック/検索は各トピックの最初の8192トークンのみを取得します。

「いいね!」 1

Discourse で埋め込みモデルを構成する方法は?またはモデルプロバイダーで?

i am sure Qwen/Qwen3-Embedding-0.6B support up to 32k tokens
and i have configured sequence length 32k

but there still are many error of embedding

「いいね!」 1

APIプロバイダーが許可していれば、サポートします。

APIプロバイダーが8192に制限している場合は、そのルールに従う必要があります。

「いいね!」 1

はい、APIプロバイダーに問い合わせます

「いいね!」 1