mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-06-27 18:50:41 +00:00
1.6 KiB
1.6 KiB
Developer Guide: Adding a New API Provider
This guide contains references to walk you through adding a new API provider.
Adding a new API provider
- First, decide which API your provider falls into (e.g. Inference, Safety, Agents, Memory).
- Decide whether your provider is a remote provider, or inline implmentation. A remote provider is a provider that makes a remote request to an service. An inline provider is a provider where implementation is executed locally. Checkout the examples, and follow the structure to add your own API provider. Please find the following code pointers:
- Build a Llama Stack distribution with your API provider.
- Test your code!
Testing your newly added API providers
- Start Llama Stack server with your distribution including your API provider.
- Test with sending a client request to the server. You may find more complex client scripts llama-stack-apps repo. Note down which scripts works and do not work with your distribution.
- Add tests for your newly added provider. See tests/ for example unit tests.
- Test the supported functionalities for your provider using our providers tests infra. See llama_stack/providers/tests//test_.
Submit your PR
After you have fully tested your newly added API provider, submit a PR with the attached test plan.