discourse-ai/spec
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
..
fabricators FEATURE: UI to update ai personas on admin page (#290) 2023-11-21 16:56:43 +11:00
fixtures/embeddings FEATURE: Embeddings to main db (#99) 2023-07-13 12:41:36 -03:00
lib FIX: implement tools framework for Anthropic (#307) 2023-11-24 06:39:56 +11:00
models FEATURE: UI to update ai personas on admin page (#290) 2023-11-21 16:56:43 +11:00
requests FEATURE: UI to update ai personas on admin page (#290) 2023-11-21 16:56:43 +11:00
serializers FIX: Serialize channel title for DMs (#90) 2023-06-16 14:37:16 -03:00
shared FIX: implement tools framework for Anthropic (#307) 2023-11-24 06:39:56 +11:00
support REFACTOR: Summarization and HyDE now use an LLM abstraction. (#297) 2023-11-23 12:58:54 -03:00
system FEATURE: remember previously selected persona (#299) 2023-11-21 17:02:27 +10:00
plugin_spec.rb DEV: DiscourseAI -> DiscourseAi rename to have consistent folders and files (#9) 2023-03-14 16:03:50 -03:00