mirror of
https://github.com/discourse/discourse-ai.git
synced 2025-03-07 01:39:54 +00:00
* DRAFT: Create AI Bot users dynamically and support custom LlmModels * Get user associated to llm_model * Track enabled bots with attribute * Don't store bot username. Minor touches to migrate default values in settings * Handle scenario where vLLM uses a SRV record * Made 3.5-turbo-16k the default version so we can remove hack
21 lines
423 B
Ruby
21 lines
423 B
Ruby
# frozen_string_literal: true
|
|
|
|
class LlmModelSerializer < ApplicationSerializer
|
|
root "llm"
|
|
|
|
attributes :id,
|
|
:display_name,
|
|
:name,
|
|
:provider,
|
|
:max_prompt_tokens,
|
|
:tokenizer,
|
|
:api_key,
|
|
:url,
|
|
:enabled_chat_bot,
|
|
:url_editable
|
|
|
|
def url_editable
|
|
object.url != LlmModel::RESERVED_VLLM_SRV_URL
|
|
end
|
|
end
|