Anthropic_community - Anthropic library that handles function invocation from the LLM

Hello, hello! :wink:

I’m excited to share a new library I’ve been working on: anthropic_community. It’s an unofficial Elixir wrapper for the Anthropic API , over-engineered to make it easier to interact with the powerful Claude LLM model.

:key: Key Highlights:

  • Function Invocations: One of the standout features is the ability to register and execute custom tool modules. By implementing the Anthropic.Tools.ToolBehaviour, you can dynamically handle function invocations from the assistant’s responses. This opens up exciting possibilities for integrating domain-specific tools and extending the capabilities of the AI.
  • Image integration: It will read images from paths, base64 or binary, validate them and send out to the AI.
  • Telemetry Integration: The library integrates with :telemetry library, emitting events for key operations. This enables you to monitor and observe the duration of each interaction of the ai and the amount of tokens used.

:package: You can find the package on Hex: anthropic_community | Hex

This is my first library in quite some time, so I welcome any feedback and suggestions, especially regarding the function invocation module. I’m excited to hear your thoughts and ideas!

P.S: for the 16 of you that tried it before version 0.4.0, please give it a new try.


Congratulations! I like Claude 3 very much but have mostly used through the chat so far. I have used the REST API to construct ‘sophisticated’ prompts, so I hope to explore anthropic_community as soon as I can.