Examples
In order to best demonstrate how Superface's API works with LLMs we have created two basic implementations using function calling.
Both examples are written in Python and can be downloaded as .ipynb
notebooks that you can use to test using your own credentials.
📄️ Anthropic
Anthropic are building a series of Large Language Models under the name Claude. In this example we show how to use their approach to function calls and tools (currenly in Beta).
📄️ MistralAI
The below example demonstrates how to use the Superface API to provide access to external tools in a MinstralAI powered agent.
📄️ OpenAI
The following example outlines how to use OpenAI Function Calling and the Superface API.
📄️ LangChain (JS Example)
LangChain is a framework for developing applications that are powered by language models. The LangChain ecosystem is always growing and has a vibrant community that is constantly providing new updates for the latest models and tools.
📄️ LangChain (Tool Calling)
The Superface tool function descriptions are available as JSON schema that follows the OpenAI tool definition. Although this format is common amongst other LLMs, there are some slight differences depending on the model you choose to use.