### Create Response with OpenAI SDK Source: https://llama-stack.readthedocs.io Example of using the OpenAI Python SDK to create a response from a specified model with tool definitions. Ensure the `base_url` is set to your Llama Stack server endpoint. ```python from openai import OpenAI client = OpenAI(base_url="http://localhost:8321/v1", api_key="fake") response = client.responses.create( model="llama-3.3-70b", input="Summarize this repository", tools=[{"type": "web_search"}], ) ``` -------------------------------- ### Run Llama Stack Starter Source: https://llama-stack.readthedocs.io Use the `uvx` command to run the Llama Stack starter configuration. This command initializes and runs the starter stack. ```bash uvx --from 'ogx[starter]' ogx stack run starter ``` -------------------------------- ### Tools API Source: https://llama-stack.readthedocs.io Manages and configures tools for AI agents. ```APIDOC ## /v1/admin/tools ### Description This endpoint provides administrative functions for managing and configuring tools available to AI agents. ### Method GET, POST, PUT, DELETE ### Endpoint /v1/admin/tools ``` -------------------------------- ### Models API Source: https://llama-stack.readthedocs.io Retrieves information about available AI models. ```APIDOC ## /v1/models ### Description This endpoint lists the available AI models that can be used for inference. ### Method GET ### Endpoint /v1/models ``` -------------------------------- ### Chat Completions API Source: https://llama-stack.readthedocs.io Provides an interface for chat-based interactions with AI models. ```APIDOC ## /v1/chat/completions ### Description This endpoint facilitates chat completions, enabling conversational interactions with AI models. ### Method POST ### Endpoint /v1/chat/completions ``` -------------------------------- ### Responses API Source: https://llama-stack.readthedocs.io Handles AI responses, allowing users to create responses with specified models, inputs, and tools. ```APIDOC ## POST /v1/responses ### Description This endpoint is used to generate responses from AI models. It supports various configurations including model selection, input prompts, and tool usage. ### Method POST ### Endpoint /v1/responses ### Request Body - **model** (string) - Required - The AI model to use for generating the response. - **input** (string) - Required - The input prompt or query for the AI model. - **tools** (array) - Optional - A list of tools the AI model can use, e.g., `[{ "type": "web_search" }]`. ### Request Example ```json { "model": "llama-3.3-70b", "input": "Summarize this repository", "tools": [ { "type": "web_search" } ] } ``` ### Response #### Success Response (200) - **response** (string) - The generated response from the AI model. ``` -------------------------------- ### Interactions API Source: https://llama-stack.readthedocs.io Provides an interface for interactions, potentially for specific providers like Google. ```APIDOC ## /v1alpha/interactions ### Description This endpoint handles interactions, designed for compatibility with APIs such as Google's. ### Method POST ### Endpoint /v1alpha/interactions ``` -------------------------------- ### Files API Source: https://llama-stack.readthedocs.io Handles file uploads and management. ```APIDOC ## /v1/files ### Description This endpoint manages file operations, including uploading and retrieving files. ### Method GET, POST, DELETE ### Endpoint /v1/files ``` -------------------------------- ### Batches API Source: https://llama-stack.readthedocs.io Manages batch operations. ```APIDOC ## /v1/batches ### Description This endpoint is used for managing batch operations. ### Method GET, POST ### Endpoint /v1/batches ``` -------------------------------- ### Connectors API Source: https://llama-stack.readthedocs.io Manages connectors for integrating with external services. ```APIDOC ## /v1/connectors ### Description This endpoint manages connectors, facilitating integration with various external services. ### Method GET, POST, PUT, DELETE ### Endpoint /v1/connectors ``` -------------------------------- ### Vector Stores API Source: https://llama-stack.readthedocs.io Manages vector stores for storing and retrieving vector embeddings. ```APIDOC ## /v1/vector_stores ### Description This API manages vector stores, which are used for storing and querying vector embeddings. ### Method GET, POST, PUT, DELETE ### Endpoint /v1/vector_stores ``` -------------------------------- ### Embeddings API Source: https://llama-stack.readthedocs.io Generates embeddings for given text inputs. ```APIDOC ## /v1/embeddings ### Description This endpoint is used to generate vector embeddings for text data, useful for semantic search and other NLP tasks. ### Method POST ### Endpoint /v1/embeddings ``` -------------------------------- ### Messages API Source: https://llama-stack.readthedocs.io Handles message-based interactions, potentially for specific providers like Anthropic. ```APIDOC ## /v1/messages ### Description This endpoint manages message-based interactions, compatible with APIs like Anthropic's. ### Method POST ### Endpoint /v1/messages ``` -------------------------------- ### Moderations API Source: https://llama-stack.readthedocs.io Performs content moderation checks. ```APIDOC ## /v1/moderations ### Description This endpoint performs content moderation checks on provided text. ### Method POST ### Endpoint /v1/moderations ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.