discourse-ai/lib/completions/endpoints
Roman Rizzi e0bf6adb5b
DEV: Tool support for the LLM service. (#366)
This PR adds tool support to available LLMs. We'll buffer tool invocations and return them instead of making users of this service parse the response.

It also adds support for conversation context in the generic prompt. It includes bot messages, user messages, and tool invocations, which we'll trim to make sure it doesn't exceed the prompt limit, then translate them to the correct dialect.

Finally, It adds some buffering when reading chunks to handle cases when streaming is extremely slow.:M
2023-12-18 18:06:01 -03:00
..
anthropic.rb DEV: Tool support for the LLM service. (#366) 2023-12-18 18:06:01 -03:00
aws_bedrock.rb DEV: Tool support for the LLM service. (#366) 2023-12-18 18:06:01 -03:00
base.rb DEV: Tool support for the LLM service. (#366) 2023-12-18 18:06:01 -03:00
canned_response.rb DEV: Tool support for the LLM service. (#366) 2023-12-18 18:06:01 -03:00
gemini.rb DEV: Tool support for the LLM service. (#366) 2023-12-18 18:06:01 -03:00
hugging_face.rb DEV: Tool support for the LLM service. (#366) 2023-12-18 18:06:01 -03:00
open_ai.rb DEV: Tool support for the LLM service. (#366) 2023-12-18 18:06:01 -03:00