Discourse AI - страница настроек большой языковой модели (LLM)

:bookmark: Это руководство посвящено странице настроек LLM, которая является частью плагина Discourse AI.

:person_raising_hand: Требуемый уровень пользователя: Администратор

Выделенная страница настроек предназначена для того, чтобы разместить все, что связано с большими языковыми моделями (LLM), используемыми в функциях Discourse AI, в одном месте.

:raised_hand_with_fingers_splayed: В зависимости от включенной функции Discourse AI может потребоваться LLM. Пожалуйста, проверьте каждую функцию Discourse AI, чтобы узнать, является ли LLM обязательным условием.


Возможности

  • Добавление новых моделей с предварительно заполненной информацией
  • Добавление пользовательских моделей, не указанных в списке
  • Настройка параметров LLM
  • Разрешение использования конкретной LLM для AI Bot
    • Просмотр имени пользователя AI Bot
  • Включение поддержки зрения (зависит от модели)
  • Настройка разрешенных типов вложений
  • Настройка квот использования для каждой группы
  • Отслеживание затрат на входные/выходные токены
  • Тестирование
  • Сохранение настроек

Добавление подключений LLM

  1. Перейдите в AdminPluginsAI
  2. Перейдите на вкладку LLMs
  3. Добавьте новое подключение и выберите вашу модель
  4. Введите API-ключ (в зависимости от модели у вас могут быть дополнительные поля для ручного ввода) и сохраните
  5. (Необязательно) Протестируйте подключение, чтобы убедиться, что оно работает

Поддерживаемые LLM

:person_tipping_hand: Вы всегда можете добавить пользовательский вариант, если не видите свою модель в списке. Поддерживаемые модели постоянно добавляются. Предварительно настроенные модели являются шаблонами — вы всегда можете добиться того же результата, используя «Ручную настройку».

Anthropic

  • Claude Opus 4.6
  • Claude Sonnet 4.6
  • Claude Haiku 4.5

Google

  • Gemini 3 Pro
  • Gemini 3 Flash

OpenAI

  • GPT-5.4
  • GPT-5 Mini
  • GPT-5 Nano

Open Router

  • DeepSeek V3.2
  • Moonshot Kimi K2.5
  • xAI Grok 4 Fast
  • MiniMax M2.5
  • Z-AI GLM-5
  • … и многие другие

Кроме того, клиенты с размещенным решением могут использовать предварительно настроенную CDCK Hosted Small LLM на странице настроек. Это LLM с открытыми весами, размещенная компанией Discourse, готовая к использованию для обеспечения работы функций AI.

Поля конфигурации

:information_source: Вы увидите только поля, относящиеся к выбранному вами провайдеру LLM. Пожалуйста, перепроверьте любые предварительно заполненные поля у соответствующего провайдера, например Model name.

Основные поля:

  • Display name — дружественное имя, отображаемое в выпадающих списках
  • Model name — идентификатор модели, отправляемый в API (например, claude-sonnet-4-6, gpt-5.2)
  • Provider — сервис, размещающий модель (например, Anthropic, OpenAI, Google, AWS Bedrock, Azure, Open Router и т. д.)
  • URL — URL-адрес конечной точки API (не отображается для AWS Bedrock)
  • API Key — настраивается через систему AI Secrets
  • Tokenizer
  • Max prompt tokens — управляет обрезкой промпта для предотвращения запросов чрезмерного размера
  • Max output tokens
  • Input cost / Output cost — стоимость за миллион токенов, используется для отслеживания использования
  • Cached input cost / Cache write cost — для провайдеров, поддерживающих кэширование промптов
  • Vision enabled — включает понимание изображений (зависит от модели)
  • Allowed attachment types — типы файлов, которые может обрабатывать модель

Специфичные для провайдера поля (отображаются динамически в зависимости от выбранного провайдера):

  • AWS Bedrock: Access Key ID, Role ARN, Region, опции рассуждения/мышления, Prompt caching
  • Anthropic: опции рассуждения, Prompt caching
  • OpenAI: Organization ID, Reasoning effort, Service tier
  • Google: Enable thinking, Thinking level
  • Open Router: Provider order, Provider quantizations

Квоты (доступны после первоначального сохранения):

  • Квоты использования для каждой группы могут быть настроены с указанием максимального количества токенов, максимального числа использований и длительности

Технический FAQ

Что такое токенизатор?

  • Токенизатор преобразует строки в токены, которые модель использует для понимания входных данных.

Какое число мне следует использовать для Max prompt tokens?

  • Хорошее эмпирическое правило — 50% от окна контекста модели, которое представляет собой сумму количества токенов, которые вы отправляете, и количества токенов, которые модель генерирует. Если промпт станет слишком большим, запрос не выполнится. Это число используется для обрезки промпта, чтобы предотвратить такое происшествие.

Ограничения

  • Иногда вы можете не видеть в списке модель, которую хотели бы использовать. Хотя вы можете добавить их вручную, мы будем поддерживать популярные модели по мере их выхода.
11 лайков

It’s too difficult, I don’t know how to do it at all. I hope to update specific tutorials on various AIs, such as Google login settings.

1 лайк

We improved the UI a lot in the past week, can you try it out again?

3 лайка

When Gemini 2.0 will be supported ?

Been supported for quite a while.

4 лайка

I seem to have an issue where I cannot Select a LLM even though I have the CDCK hosted ones configured…

is this normal?

2 лайка

A lot to unwrap here, which llm are you trying to choose for what?

The CDCK LLMs are only available for very specific features, to see which you need to head to /admin/whats-new on your instance and click “only show experimental features”, you will need to enable them to unlock the CDCK LLM on specific features.

Any LLM you define outside of CDCK LLMs is available to all features.

4 лайка

Is there also a topic that provides a general rundown of the best cost/quality balance? Or even which LLM can be used for free for a small community and basic functionality? I can dive into the details and play around. But I’m a bit short in terms of time.

For example, I only care about spam detection and a profanity filter. I had this for free, but those plugins are deprecated or soon to be. It would be nice if I can retain this functionality without having to pay for an LLM.

3 лайка

We do have this topic, that might be what you are looking for.

2 лайка

Done! It was indeed pretty easy. But maybe for a non techie it may still be a bit hard to setup. For example, the model name was automatically set in the settings, but wasn’t the correct one. Luckily I recognized the model name in a curl example for Claude on the API page and then it worked :tada:

Estimated costs are maybe 30 euro cents per month for spam control (I don’t have a huge forum). So that’s manageable! I’ve set a limit of 5 euros in the API console, just in case.

1 лайк

Which one did you pick for Claude? What was the incorrect name shown, and what did you correct it to?

1 лайк

I use Claude 3.5, the model ID is by default claude-3-5-haiku, but I had to change it to claude-3-5-haiku-20241022, otherwise I got an error.

1 лайк

Good to note, yeah sometimes there might be a disconnect. The auto-populated info should act as guidance, which tends to work most of the time, but does fall short in certain cases such as yours (given all the different models and provider configs)

I have updated the OP of this guide

1 лайк

This model is not listed on 3.4.2 - are those pre-configs only available on 3.5 and I have to add them manually?

Edit: Also what option do I choose for “Tokenizer” when using Grok 3 models?

Pre-configs are simply templates, you can get the same end result by using the “Manual configuration”.

I’ve found that the Gemini tokenizer is pretty close the the Grok one, so try that.

2 лайка

Is there a way to use IBM WatsonX through the current configuration management, or would this require additional development work by the Discourse staff?

Does IBM WatsonX expose an OpenAI compatible API by any chance?

Great question. A quick poke around the docs didn’t tell me much, but the fact that this repository exists suggests that it is not directly compatible: GitHub - aseelert/watsonx-openai-api: Watsonx Openai compatible API

Which of these LLMs are free to use for anti-spam?

Edit: Nm, I’m using Gemini Flash 2.5

I always wonder too. This seems like the best answer to that question.

But also, there is this in the OP from the Spam config topic. I think it’s just a little hard to find in all of the information that’s there.

1 лайк