Compare commits

...
Author SHA1 Message Date
David Taylor aee2081356 Fix lib directory 2024-05-02 19:19:09 +01:00
David Taylor e6bfec5bdb DEV: Update engine config to match skeleton
- adds `lib/` autoloading (and removes the plugin.rb workaround)
- adds eager loading of scheduled jobs in development (otherwise they don't work at all)
2024-05-02 18:53:22 +01:00
Martin Brennan b52d3c7d29 DEV: Moving around admin persona config routes again (#586)
The initial setup done in fb0d56324f
clashed with other plugins, I found this when trying to do the same
for Gamification. This uses a better routing setup and removes the
need to define the config nav link for Settings -- that is always inserted.

Relies on https://github.com/discourse/discourse/pull/26707
2024-05-02 12:42:30 +10:00
Sam 6623928b95 FIX: call after tool calls failing on OpenAI / Gemini (#599)
A recent change meant that llm instance got cached internally, repeat calls
to inference would cache data in Endpoint object leading model to
failures.

Both Gemini and Open AI expect a clean endpoint object cause they
set data.

This amends internals to make sure llm.generate will always operate
on clean objects
2024-05-01 17:50:58 +10:00
Discourse Translator Bot aab59b9327 Update translations (#598) 2024-04-30 21:57:37 +02:00
Kris 6860ee50be UX: prevent social share content from overflowing container (#597) 2024-04-30 09:47:21 -04:00
151 changed files with 134 additions and 61 deletions
@@ -1,7 +0,0 @@
import DiscourseRoute from "discourse/routes/discourse";
export default DiscourseRoute.extend({
model() {
return this.modelFor("adminPlugins.show.discourse-ai.ai-personas");
},
});
@@ -1,12 +0,0 @@
import { inject as service } from "@ember/service";
import DiscourseRoute from "discourse/routes/discourse";
export default class DiscourseAiIndexRoute extends DiscourseRoute {
@service router;
beforeModel() {
return this.router.transitionTo(
"adminPlugins.show.discourse-ai.ai-personas.index"
);
}
}
@@ -17,7 +17,7 @@ export default DiscourseRoute.extend({
this._super(controller, model);
controller.set(
"allPersonas",
this.modelFor("adminPlugins.show.discourse-ai.ai-personas")
this.modelFor("adminPlugins.show.discourse-ai-personas")
);
},
});
@@ -3,7 +3,7 @@ import DiscourseRoute from "discourse/routes/discourse";
export default DiscourseRoute.extend({
async model(params) {
const allPersonas = this.modelFor(
"adminPlugins.show.discourse-ai.ai-personas"
"adminPlugins.show.discourse-ai-personas"
);
const id = parseInt(params.id, 10);
return allPersonas.findBy("id", id);
@@ -13,7 +13,7 @@ export default DiscourseRoute.extend({
this._super(controller, model);
controller.set(
"allPersonas",
this.modelFor("adminPlugins.show.discourse-ai.ai-personas")
this.modelFor("adminPlugins.show.discourse-ai-personas")
);
},
});
@@ -4,11 +4,9 @@ export default {
path: "/plugins",
map() {
this.route("discourse-ai", { path: "/" }, function () {
this.route("ai-personas", function () {
this.route("new");
this.route("show", { path: "/:id" });
});
this.route("discourse-ai-personas", { path: "ai-personas" }, function () {
this.route("new");
this.route("show", { path: "/:id" });
});
},
};
@@ -102,7 +102,7 @@ export default class PersonaEditor extends Component {
if (isNew && this.args.model.rag_uploads.length === 0) {
this.args.personas.addObject(this.args.model);
this.router.transitionTo(
"adminPlugins.show.discourse-ai.ai-personas.show",
"adminPlugins.show.discourse-ai-personas.show",
this.args.model
);
} else {
@@ -175,7 +175,7 @@ export default class PersonaEditor extends Component {
return this.args.model.destroyRecord().then(() => {
this.args.personas.removeObject(this.args.model);
this.router.transitionTo(
"adminPlugins.show.discourse-ai.ai-personas.index"
"adminPlugins.show.discourse-ai-personas.index"
);
});
},
@@ -265,7 +265,7 @@ export default class PersonaEditor extends Component {
<template>
<BackButton
@route="adminPlugins.show.discourse-ai.ai-personas"
@route="adminPlugins.show.discourse-ai-personas"
@label="discourse_ai.ai_persona.back"
/>
<form
@@ -50,7 +50,7 @@ export default class AiPersonaListEditor extends Component {
<h3>{{i18n "discourse_ai.ai_persona.short_title"}}</h3>
{{#unless @currentPersona.isNew}}
<LinkTo
@route="adminPlugins.show.discourse-ai.ai-personas.new"
@route="adminPlugins.show.discourse-ai-personas.new"
class="btn btn-small btn-primary"
>
{{icon "plus"}}
@@ -105,7 +105,7 @@ export default class AiPersonaListEditor extends Component {
</td>
<td>
<LinkTo
@route="adminPlugins.show.discourse-ai.ai-personas.show"
@route="adminPlugins.show.discourse-ai-personas.show"
@model={{persona}}
class="btn btn-text btn-small"
>{{i18n "discourse_ai.ai_persona.edit"}} </LinkTo>
@@ -1 +0,0 @@
<AiPersonaListEditor @personas={{this.model}} />
@@ -1 +0,0 @@
<AiPersonaListEditor @personas={{this.model}} />
@@ -12,13 +12,9 @@ export default {
withPluginApi("1.1.0", (api) => {
api.addAdminPluginConfigurationNav("discourse-ai", PLUGIN_NAV_MODE_TOP, [
{
label: "admin.plugins.change_settings_short",
route: "adminPlugins.show.settings",
},
{
label: "discourse_ai.ai_persona.short_title",
route: "adminPlugins.show.discourse-ai.ai-personas",
route: "adminPlugins.show.discourse-ai-personas",
},
]);
});
+5 -4
View File
@@ -144,9 +144,11 @@ de:
create_user_help: Du kannst dieser Persona optional einen Benutzer zuordnen. Wenn du das tust, wird die KI diesen Benutzer verwenden, um auf Anfragen zu antworten.
default_llm: Standard-Sprachmodell
default_llm_help: Das Standard-Sprachmodell, das für diese Persona verwendet werden soll. Erforderlich, wenn du die Persona in öffentlichen Beiträgen erwähnen möchtest.
question_consolidator_llm: Sprachmodell für Fragenkonsolidierer
question_consolidator_llm_help: Das Sprachmodell, das für den Fragenkonsolidierer verwendet werden soll. Du kannst ein weniger leistungsfähiges Modell wählen, um Kosten zu sparen.
system_prompt: System-Eingabeaufforderung
show_indexing_options: "Indizierungsoptionen anzeigen"
hide_indexing_options: "Indizierungsoptionen ausblenden"
show_indexing_options: "Upload-Optionen anzeigen"
hide_indexing_options: "Upload-Optionen ausblenden"
save: Speichern
saved: KI-Persona gespeichert
enabled: "Aktiviert?"
@@ -183,8 +185,7 @@ de:
Außerdem kannst du ihn so einrichten, dass bestimmte Benutzergruppen Zugriff auf bestimmte Personas haben. Das bedeutet, dass Sie für verschiedene Bereiche Ihres Forums unterschiedliche KI-Verhaltensweisen verwenden können, was die Vielfalt und den Reichtum der Interaktionen Ihrer Community weiter verbessert.
uploads:
title: "Uploads"
description: "Deine KI-Persona wird in der Lage sein, den Inhalt der enthaltenen Dateien zu durchsuchen und zu referenzieren. Hochgeladene Dateien müssen als Klartext (.txt) formatiert sein."
hint: "Um zu kontrollieren, wo der Inhalt der Datei in der System-Eingabeaufforderung platziert wird, füge den Platzhalter {uploads} in die obige System-Eingabeaufforderung ein."
description: "Deine KI-Persona wird in der Lage sein, den Inhalt der enthaltenen Dateien zu durchsuchen und zu referenzieren. Hochgeladene Dateien sollten als Plaintext (.txt) oder Markdown (.md) formatiert sein."
button: "Dateien hinzufügen"
filter: "Uploads filtern"
indexed: "Indiziert"
+5 -2
View File
@@ -144,9 +144,11 @@ he:
create_user_help: אפשר לצרף משתמש לדמות הזאת כרשות. אם האפשרות הזאת תסומן, הבינה המלאכותית תשתמש במשתמש הזה כדי להגיב לבקשות.
default_llm: דגם שפה כברירת מחדל
default_llm_help: דגם ברירת המחדל לשימוש לדמות הזאת. נחוץ כדי לאזכר דמות בפוסטים ציבוריים.
question_consolidator_llm: מודל שפה למגבש השאלות
question_consolidator_llm_help: מודל השפה לשימוש עבור מגבש השאלות, אפשר לבחור במודל פחות חזק כדי לחסוך בעלויות.
system_prompt: בקשת מערכת
show_indexing_options: "הצגת אפשרויות סידור במפתח"
hide_indexing_options: "הסתרת אפשרויות סידור במפתח"
show_indexing_options: "הצגת אפשרויות העלאה"
hide_indexing_options: "הסתרת אפשרויות העלאה"
save: שמירה
saved: דמות בינה מלאכותית נשמרה
enabled: "מאופשר?"
@@ -180,6 +182,7 @@ he:
יתרה מכך, אפשר להגדיר אותה כך שרק לקבוצות מסוימות תהיינה גישה לדמויות מסוימות. משמעות הדבר היא שאפשר לנהל התנהגויות שונות לבינה המלאכותית לאזורים שונים בפורום שלך, ובכך להרחיב את הגיוון ואת העושר של ההתנהלות בקהילה שלך.
uploads:
title: "העלאות"
description: "דמות הבינה המלאכותית שלך תוכל לחפש ולהפנות לתוכן של קבצים כלולים. קבצים שהועלו אמורים להיות בתסדירי טקסט פשוט (‎.txt) או markdown‏ (‎.md)."
button: "הוספת קבצים"
filter: "סינון העלאות"
indexed: "סודר במפתח"
+5
View File
@@ -107,10 +107,15 @@ id:
edit: Ubah
description: Deskripsi
user: Pengguna
question_consolidator_llm: Model Bahasa untuk Konsolidator Pertanyaan
question_consolidator_llm_help: Model bahasa yang digunakan untuk konsolidator pertanyaan, Anda dapat memilih model yang kurang kuat untuk menghemat biaya.
show_indexing_options: "Tampilkan Opsi Unggah"
hide_indexing_options: "Sembunyikan Opsi Unggah"
save: Simpan
enabled: "Diaktifkan?"
delete: Hapus
uploads:
description: "Persona AI Anda akan dapat mencari dan mereferensikan konten file yang disertakan. File yang diunggah harus diformat sebagai teks biasa (.txt) atau markdown (.md)."
uploading: "Mengunggah..."
ai_helper:
missing_content: "Silakan masukkan beberapa konten untuk menghasilkan saran."
-2
View File
@@ -170,8 +170,6 @@ tr_TR:
Dahası, belirli kullanıcı gruplarının belirli kişiliklere erişime sahip olacak şekilde de belirleyebilirsiniz. Bu, forumunuzun farklı bölümleri için farklı YZ davranışlarına sahip olabileceğiniz anlamına gelir ve böylece topluluğunuzun etkileşimlerinin çeşitliliğini ve zenginliğini geliştirebilirsiniz.
uploads:
title: "Yüklemeler"
description: "Yapay zeka personanız, dahil edilen dosyaların içeriğini arayabilecek ve referans verebilecektir. Yüklenen dosyalar düz metin (.txt) olarak biçimlendirilmelidir"
hint: "Dosyanın içeriğinin sistem isteminde nereye yerleştirileceğini kontrol etmek için, yukarıdaki sistem istemine {uploads} yer tutucusunu ekleyin."
button: "Dosya Ekle"
filter: "Yüklemeleri filtrele"
uploading: "Yükleniyor..."
@@ -12,9 +12,9 @@ module DiscourseAi
<<~PROMPT
You are Discourse Helper Bot
- Discourse Helper Bot understand *markdown* and responds in Discourse **markdown**.
- Discourse Helper Bot has access to the search function on meta.discourse.org and can help you find answers to your questions.
- Discourse Helper Bot ALWAYS backs up answers with actual search results from meta.discourse.org, even if the information is in your training set
- Discourse Helper Bot understands *markdown* and responds in Discourse **markdown**.
- Discourse Helper Bot has access to the search function on meta.discourse.org and can help answer user questions.
- Discourse Helper Bot ALWAYS backs up answers with actual search results from meta.discourse.org, even if the information is in the training set
- Discourse Helper Bot does not use the word Discourse in searches, search function is restricted to Discourse Meta and Discourse specific discussions
- Discourse Helper Bot understands that search is keyword based (terms are joined using AND) and that it is important to simplify search terms to find things.
- Discourse Helper Bot understands that users often badly phrase and misspell words, it will compensate for that by guessing what user means.

Some files were not shown because too many files have changed in this diff Show More