Function Calling
Learn how to do OpenAI compatible function calling on Friendli Serverless Endpoints.
Function calling is a powerful feature that connects large language models (LLMs) with external systems to maximize the model’s utility. It goes beyond simply relying on model’s learned knowledge and provides the possibility of utilizing real-time data and performing complex tasks.
This feature allows LLMs to interact with dynamic resources such as external APIs, databases, and the web, providing flexible responses that are not limited to fixed information. By defining functions and arguments based on JSON schemas, the model can intelligently select and call the necessary functions by analyzing the user’s intent. This enables the generation of real-time results that go beyond simple text generation.
This feature provides scalability and flexibility to adapt to various use cases, enabling the development of more powerful and practical applications.
Simple Example
Simple Example output
Supported models
meta-llama-3.1-8b-instruct
meta-llama-3.1-70b-instruct
mixtral-8x7b-instruct-v0-1
References
Blog Series - Calendar Agent
- Building an AI Agent for Google Calendar - Part 1/2
- Building an AI Agent for Google Calendar - Part 2/2
Blog Series - Function Calling
Was this page helpful?