Go to file
Sam 6282b6d21f
FIX: implement tools framework for Anthropic (#307)
Previous to this changeset we used a custom system for tools/command
support for Anthropic.

We defined commands by using !command as a signal to execute it

Following Anthropic Claude 2.1, there is an official supported syntax (beta)
for tools execution.

eg:

```
+      <function_calls>
+      <invoke>
+      <tool_name>image</tool_name>
+      <parameters>
+      <prompts>
+      [
+      "an oil painting",
+      "a cute fluffy orange",
+      "3 apple's",
+      "a cat"
+      ]
+      </prompts>
+      </parameters>
+      </invoke>
+      </function_calls>
```

This implements the spec per Anthropic, it should be stable enough
to also work on other LLMs.

Keep in mind that OpenAI is not impacted here at all, as it has its
own custom system for function calls.

Additionally:

- Fixes the title system prompt so it works with latest Anthropic
- Uses new spec for "system" messages by Anthropic
- Tweak forum helper persona to guide Anthropic a tiny be better

Overall results are pretty awesome and Anthropic Claude performs
really well now on Discourse
2023-11-24 06:39:56 +11:00
.github/workflows Initial commit 2023-02-17 11:33:47 -03:00
app FEATURE: UI to update ai personas on admin page (#290) 2023-11-21 16:56:43 +11:00
assets DEV: Only allow semantic search on "Relevance" sort mode (#306) 2023-11-23 11:30:17 -08:00
config DEV: Only allow semantic search on "Relevance" sort mode (#306) 2023-11-23 11:30:17 -08:00
db FEATURE: UI to update ai personas on admin page (#290) 2023-11-21 16:56:43 +11:00
lib FIX: implement tools framework for Anthropic (#307) 2023-11-24 06:39:56 +11:00
spec FIX: implement tools framework for Anthropic (#307) 2023-11-24 06:39:56 +11:00
test/javascripts Initial commit 2023-02-17 11:33:47 -03:00
tokenizers FEATURE: Bge-large-en embeddings via Cloudflare Workers AI API (#241) 2023-10-04 13:47:51 -03:00
.discourse-compatibility DEV: Updates to the summarization strategy API (#301) 2023-11-21 13:27:35 -03:00
.eslintrc.cjs DEV: Update linting configs (#280) 2023-11-03 11:30:09 +00:00
.gitignore Initial commit 2023-02-17 11:33:47 -03:00
.prettierignore FEATURE: UI to update ai personas on admin page (#290) 2023-11-21 16:56:43 +11:00
.prettierrc.cjs DEV: Update linting configs (#280) 2023-11-03 11:30:09 +00:00
.rubocop.yml DEV: Update linting configs (#280) 2023-11-03 11:30:09 +00:00
.streerc DEV: Update linting configs (#280) 2023-11-03 11:30:09 +00:00
.template-lintrc.js DEV: Update linting configs (#280) 2023-11-03 11:30:09 +00:00
Gemfile DEV: Update linting configs (#280) 2023-11-03 11:30:09 +00:00
Gemfile.lock DEV: Update linting configs (#280) 2023-11-03 11:30:09 +00:00
LICENSE Initial commit 2023-02-17 11:33:47 -03:00
README.md CHORE: Update Readme (#185) 2023-09-04 15:46:35 -03:00
package.json DEV: Update linting configs (#280) 2023-11-03 11:30:09 +00:00
plugin.rb REFACTOR: Summarization and HyDE now use an LLM abstraction. (#297) 2023-11-23 12:58:54 -03:00
translator.yml DEV: Add Crowdin support (#108) 2023-07-15 00:56:15 +02:00
yarn.lock DEV: Update linting configs (#280) 2023-11-03 11:30:09 +00:00

README.md

Discourse AI Plugin

Plugin Summary

For more information, please see: https://meta.discourse.org/t/discourse-ai/259214?u=falco