### Install Mintlify CLI Source: https://github.com/pezzolabs/pezzo/blob/main/docs/README.md Installs the Mintlify CLI globally, which is required for previewing documentation changes locally. ```bash npm i -g mintlify ``` -------------------------------- ### Install Pezzo Client and OpenAI SDK Source: https://github.com/pezzolabs/pezzo/blob/main/docs/introduction/tutorial-prompt-management/overview.mdx Installs the necessary dependencies for using the Pezzo Client and OpenAI SDK in your project. ```bash npm i @pezzo/client openai ``` -------------------------------- ### Install Pezzo Client Source: https://github.com/pezzolabs/pezzo/blob/main/docs/client/pezzo-client-python.mdx Installs the Pezzo client package from PyPi using either pip or poetry. ```bash pip install pezzo ``` ```bash poetry add pezzo ``` -------------------------------- ### Install Dependencies Source: https://github.com/pezzolabs/pezzo/blob/main/docs/introduction/tutorial-prompt-management/step-3-consume-prompt.mdx Installs the Pezzo Client and the OpenAI NPM package required for consuming prompts in a Node.js application. ```bash npm i @pezzo/client openai ``` -------------------------------- ### Consume Prompt Example Source: https://github.com/pezzolabs/pezzo/blob/main/docs/introduction/tutorial-prompt-management/step-3-consume-prompt.mdx An example demonstrating how to consume a prompt in a Node.js application using TypeScript, likely involving the Pezzo client and OpenAI integration. ```typescript import { PezzoClient } from "@pezzo/client"; import OpenAI from "openai"; // Initialize OpenAI client const openai = new OpenAI({ apiKey: process.env.OPENAI_API_KEY, }); // Initialize Pezzo client const pezzo = new PezzoClient({ apiKey: process.env.PEZZO_API_KEY, // You can also configure the OpenAI client here if you want Pezzo to manage it // openai: openai, }); async function consumePrompt() { try { // Assume you have a prompt defined or fetched const prompt = await pezzo.prompt.get("your-prompt-name"); if (!prompt) { console.error("Prompt not found."); return; } // Generate content using the prompt and OpenAI const completion = await openai.chat.completions.create({ model: prompt.settings.model, messages: [ { role: "system", content: prompt.content }, { role: "user", content: "Tell me a short story." }, ], }); console.log("Generated content:", completion.choices[0].message.content); // Log the interaction with Pezzo for observability await pezzo.interaction.create({ promptId: prompt.id, promptName: prompt.name, promptVersion: prompt.version, input: "Tell me a short story.", output: completion.choices[0].message.content, model: prompt.settings.model, provider: "openai", // Add other relevant metadata }); } catch (error) { console.error("Error consuming prompt:", error); } } consumePrompt(); ``` -------------------------------- ### Start Local Development Server Source: https://github.com/pezzolabs/pezzo/blob/main/docs/README.md Runs the Mintlify development server to preview documentation changes locally. This command should be executed from the root of the documentation directory, where the 'mint.json' file is located. ```bash mintlify dev ``` -------------------------------- ### Install Pezzo Client Source: https://github.com/pezzolabs/pezzo/blob/main/docs/client/pezzo-client-node.mdx Instructions for installing the Pezzo client package using different package managers like npm, yarn, and pnpm. ```bash npm i @pezzo/client ``` ```bash yarn add @pezzo/client ``` ```bash pnpm add @pezzo/client ``` -------------------------------- ### Install Pezzo Client with OpenAI Source: https://github.com/pezzolabs/pezzo/blob/main/libs/client/README.md Installs the Pezzo client and the OpenAI library using npm. This is the initial step to integrate Pezzo's LLMOps capabilities with OpenAI models. ```sh npm install @pezzo/client openai ``` -------------------------------- ### Start Pezzo Stack with Docker Compose Source: https://github.com/pezzolabs/pezzo/blob/main/docs/deployment/docker-compose.mdx Starts all Pezzo infrastructure services (PostgreSQL, Redis) and components (Server, Console) using Docker Compose. This command also automatically applies database migrations. ```bash docker compose up ``` -------------------------------- ### Install NPM Dependencies Source: https://github.com/pezzolabs/pezzo/blob/main/README.md Installs all necessary Node.js dependencies for the Pezzo project. This is a prerequisite for running Pezzo in development mode. ```bash npm install ``` -------------------------------- ### Spin up Infrastructure Dependencies via Docker Compose Source: https://github.com/pezzolabs/pezzo/blob/main/README.md Starts the core infrastructure services required by Pezzo, including PostgreSQL, ClickHouse, Redis, and Supertokens, using Docker Compose. This command is essential for running Pezzo locally in development. ```bash docker-compose -f docker-compose.infra.yaml up ``` -------------------------------- ### Install Pezzo and OpenAI Packages Source: https://github.com/pezzolabs/pezzo/blob/main/docs/client/integrations/openai.mdx Installs the necessary Pezzo client and OpenAI packages for Node.js (npm, yarn, pnpm) and Python (pip, poetry). ```bash npm i @pezzo/client openai ``` ```bash yarn add @pezzo/client openai ``` ```bash pnpm add @pezzo/client openai ``` ```bash pip install pezzo ``` ```bash poetry add pezzo ``` -------------------------------- ### Prompt Content Example Source: https://github.com/pezzolabs/pezzo/blob/main/docs/introduction/tutorial-prompt-management/step-2-prompt-engineering.mdx This is an example of prompt content that includes variables for dynamic input. The variables `numFacts` and `topic` are enclosed in curly braces, indicating they can be replaced with specific values during prompt execution. ```plaintext Generate {numFacts} facts about the following topic: "{topic}" ``` -------------------------------- ### Get Prompt Deployment Source: https://github.com/pezzolabs/pezzo/blob/main/docs/api-reference/prompts/get-the-deployed-prompt-version-to-a-particular-environment.mdx Retrieves information about a specific prompt deployment. This endpoint allows users to fetch details related to a deployed prompt, including its version, configuration, and status. ```APIDOC openapi: get /prompts/v2/deployment summary: Get a prompt deployment operationId: getPromptDeployment tags: - Prompts parameters: - name: promptId in: query required: true schema: type: string description: The ID of the prompt to retrieve. - name: version in: query required: false schema: type: string description: The specific version of the prompt deployment to retrieve. If not provided, the latest version is returned. responses: '200': description: Successful retrieval of prompt deployment information. content: application/json: schema: type: object properties: id: type: string description: The unique identifier for the prompt deployment. promptId: type: string description: The identifier of the prompt. version: type: string description: The version of the prompt deployment. status: type: string enum: [active, inactive, archived] description: The current status of the deployment. createdAt: type: string format: date-time description: The timestamp when the deployment was created. updatedAt: type: string format: date-time description: The timestamp when the deployment was last updated. '404': description: Prompt deployment not found. '500': description: Internal server error. ``` -------------------------------- ### Create a New Branch Source: https://github.com/pezzolabs/pezzo/blob/main/CONTRIBUTING.md Creates a new branch for your changes with a specific naming convention to maintain uniformity and clarity. Examples include `docs/`, `feat/`, and `fix/` prefixes. ```jsx git checkout -b branch-name-here ``` -------------------------------- ### Pezzo Client API Reference Source: https://github.com/pezzolabs/pezzo/blob/main/docs/introduction/tutorial-prompt-management/overview.mdx Provides an overview of the Pezzo Client's core functionalities for interacting with published prompts. This includes initializing the client, fetching prompts, and making API calls through integrated SDKs. ```APIDOC Pezzo: __init__(config: PezzoConfig) config: Configuration object for the Pezzo client. apiKey: string - Your Pezzo API key. projectId: string - The ID of your Pezzo project. environment: string - The target environment (e.g., 'Production', 'Development'). getPrompt(promptName: string): Promise promptName: The name of the prompt to retrieve. Returns: A Promise that resolves to the latest version of the specified prompt for the configured environment. PezzoOpenAI: __init__(pezzoClient: Pezzo) pezzoClient: An initialized Pezzo client instance. chat.completions.create(prompt: Prompt, options?: OpenAICompletionOptions): Promise prompt: The Prompt object obtained from pezzo.getPrompt(). options: Optional configuration for the OpenAI API call. variables: Record - Variables to be interpolated into the prompt. properties: Record - Custom properties to associate with the request. Returns: A Promise that resolves to the OpenAI API response. ``` -------------------------------- ### Consume Prompt with Pezzo Client Source: https://github.com/pezzolabs/pezzo/blob/main/docs/introduction/tutorial-prompt-management/overview.mdx Demonstrates how to initialize the Pezzo and OpenAI clients, fetch a published prompt, and make a request to the OpenAI API with variables and custom properties. ```typescript import { Pezzo, PezzoOpenAI } from "@pezzo/client"; // Initialize the Pezzo client const pezzo = new Pezzo({ apiKey: "", projectId: "", environment: "Production", }); // Initialize the OpenAI client const openai = new PezzoOpenAI(pezzo); async function main() { // Get the deployed "FactGenerator" prompt version const prompt = await pezzo.getPrompt("FactGenerator"); // Call the OpenAI API, passing the prompt as an argument. You can override parameters if you wish. const response = await openai.chat.completions.create(prompt, { variables: { // You can define variables that will be interpolated during execution. numFacts: 3, topic: "Artificial Intelligence", }, properties: { // You can optionally specify custom properties that will be associated with the request. someProperty: "someValue", }, }); console.log("response", response); } main(); ``` -------------------------------- ### Deploy Prisma Migrations Source: https://github.com/pezzolabs/pezzo/blob/main/README.md Deploys Prisma database migrations using dotenv-cli to specify the environment file and the schema path. ```bash npx dotenv-cli -e apps/server/.env -- npx prisma migrate deploy --schema apps/server/prisma/schema.prisma ``` -------------------------------- ### Run Pezzo Console Source: https://github.com/pezzolabs/pezzo/blob/main/README.md Serves the Pezzo Console using the nx build tool. The console is accessible at http://localhost:4200. ```bash npx nx serve console ``` -------------------------------- ### Pezzo Client API Reference Source: https://github.com/pezzolabs/pezzo/blob/main/docs/client/pezzo-client-node.mdx API documentation for the Pezzo client, including constructor options and methods for retrieving prompts. ```APIDOC Pezzo.constructor(options: PezzoOptions) options: PezzoOptions apiKey: string (optional, defaults to process.env.PEZZO_API_KEY) Pezzo API key projectId: string (optional, defaults to process.env.PEZZO_PROJECT_ID) Pezzo project ID environment: string (optional, defaults to process.env.PEZZO_ENVIRONMENT) Pezzo environment name serverUrl: string (optional, defaults to https://api.pezzo.ai) Pezzo server URL Pezzo.getPrompt(promptName: string) promptName: string The name of the prompt to retrieve. The prompt must be deployed to the current environment specified when initializing the Pezzo client. ``` -------------------------------- ### Re-install Mintlify Dependencies Source: https://github.com/pezzolabs/pezzo/blob/main/docs/README.md Troubleshoots issues with 'mintlify dev' not running by re-installing dependencies. This command ensures all necessary packages are correctly set up. ```bash mintlify install ``` -------------------------------- ### Initialize Pezzo Client Manually Source: https://github.com/pezzolabs/pezzo/blob/main/docs/client/pezzo-client-node.mdx Shows how to manually configure and initialize the Pezzo client by providing the API key, project ID, and environment directly in the constructor. ```typescript import { Pezzo, PezzoOpenAI } from "@pezzo/client"; // Initialize the Pezzo client and export it export const pezzo = new Pezzo({ apiKey: "your-api-key", projectId: "your-project-id", environment: "Production", }); // Initialize PezzoOpenAI and export it export const openai = new PezzoOpenAI(pezzo); ``` -------------------------------- ### Testing AI Prompts in Pezzo Source: https://github.com/pezzolabs/pezzo/blob/main/docs/introduction/tutorial-prompt-management/overview.mdx Demonstrates how to test AI prompts within the Pezzo platform before publishing. It explains how to input values for prompt variables (e.g., numFacts, topic) in a modal and interpret the test results, which include token usage, cost, status, duration, and request/response bodies. ```plaintext numFacts: 3 topic: cats ``` -------------------------------- ### Run Pezzo Server Source: https://github.com/pezzolabs/pezzo/blob/main/README.md Serves the Pezzo server using the nx build tool. The server is accessible at http://localhost:3000/api/healthz. ```bash npx nx serve server ``` -------------------------------- ### Pezzo Client API Reference Source: https://github.com/pezzolabs/pezzo/blob/main/docs/client/pezzo-client-python.mdx Provides details on the Pezzo client's API methods. Currently includes the get_prompt method. ```APIDOC pezzo.get_prompt(prompt_name: string) Retrieves a prompt by its name. The prompt must be deployed to the current environment specified during client initialization. Parameters: prompt_name (string): The name of the prompt to retrieve. ``` -------------------------------- ### Create and Manage AI Prompts Source: https://github.com/pezzolabs/pezzo/blob/main/docs/introduction/tutorial-prompt-management/overview.mdx This section details the process of creating a new prompt in Pezzo, naming it 'FactGenerator', and configuring its content and settings for AI model interaction. It covers defining variables within the prompt content and adjusting model-specific parameters like temperature and max response length. ```plaintext Generate {numFacts} facts about the following topic: "{topic}" ``` -------------------------------- ### Initialize Pezzo Client Source: https://github.com/pezzolabs/pezzo/blob/main/docs/client/pezzo-client-python.mdx Initializes the Pezzo client by importing it. The client automatically reads configuration from environment variables: PEZZO_API_KEY, PEZZO_PROJECT_ID, and PEZZO_ENVIRONMENT. ```python from pezzo.client import pezzo ``` -------------------------------- ### Build Common Library Source: https://github.com/pezzolabs/pezzo/blob/main/libs/types/README.md Command to build the common library using Nx. This command compiles the library's code and prepares it for deployment or further use. ```bash nx build common ``` -------------------------------- ### Build Common Library Source: https://github.com/pezzolabs/pezzo/blob/main/libs/common/README.md Command to build the common library using Nx. This command compiles the library's code and prepares it for deployment or further use. ```bash nx build common ``` -------------------------------- ### Initialize Pezzo Client with Environment Variables Source: https://github.com/pezzolabs/pezzo/blob/main/docs/client/pezzo-client-node.mdx Demonstrates how to initialize the Pezzo client using environment variables for API key, project ID, and environment. The client automatically picks these up. ```typescript import { Pezzo, PezzoOpenAI } from "@pezzo/client"; // Initialize the Pezzo client and export it export const pezzo = new Pezzo(); // Initialize PezzoOpenAI and export it export const openai = new PezzoOpenAI(pezzo); ``` -------------------------------- ### Pezzo Integration with OpenAI Source: https://github.com/pezzolabs/pezzo/blob/main/docs/introduction/tutorial-observability/overview.mdx Integrates the OpenAI client with Pezzo for observability by setting a custom baseURL and Pezzo-specific headers. This allows Pezzo to proxy and monitor all requests made to the OpenAI API. ```ts import OpenAI from "openai"; // Initialize the Pezzo client const openai = new OpenAI({ baseURL: "https://proxy.pezzo.ai/openai/v1", defaultHeaders: { "X-Pezzo-Api-Key": "", "X-Pezzo-Project-Id": "", "X-Pezzo-Environment": "Production", } }); async function main() { // Make calls to the OpenAI API as you normally would! const completion = await openai.chat.completions.create( { model: "gpt-3.5-turbo", temperature: 0, messages: [ { role: "user", content: "Tell me 5 fun facts about yourself", }, ], } ); } main(); ``` ```py import openai openai.base_url = "https://proxy.pezzo.ai/openai/v1"openai.default_headers = { "X-Pezzo-Api-Key": "", "X-Pezzo-Project-Id": "", "X-Pezzo-Environment": "Production" } chat_completion = openai.chat.completions.create( model="gpt-3.5-turbo", messages=[ { "role": "user", "content": "Tell me 5 fun facts about yourself", } ] ) ``` -------------------------------- ### Run Unit Tests Source: https://github.com/pezzolabs/pezzo/blob/main/libs/ui/README.md Executes the unit tests for the UI library using the Jest testing framework. This command is essential for verifying the functionality and correctness of the UI components. ```bash nx test ui ``` -------------------------------- ### Clone Pezzo Repository Source: https://github.com/pezzolabs/pezzo/blob/main/CONTRIBUTING.md Clones the Pezzo repository from GitHub to your local machine. This is the first step in setting up your development environment. ```shell git clone https://github.com/{your-GitHub-username}/pezzo.git ``` -------------------------------- ### Making OpenAI Requests with Prompt Management (Node.js) Source: https://github.com/pezzolabs/pezzo/blob/main/docs/client/integrations/openai.mdx Demonstrates how to fetch a prompt from Pezzo and use it to make a request to OpenAI, with an option to override prompt properties. ```typescript const prompt = await pezzo.getPrompt("PromptName"); const response = await openai.chat.completions.create(prompt); const response = await openai.chat.completions.create({ ...prompt, model: "gpt-4", }); ``` -------------------------------- ### Making OpenAI Requests without Prompt Management (Python) Source: https://github.com/pezzolabs/pezzo/blob/main/docs/client/integrations/openai.mdx Demonstrates making standard OpenAI requests using the PezzoOpenAI instance in Python, enabling Pezzo's observability without explicit prompt management. ```python from pezzo.client import pezzo from pezzo.openai import openai response = openai.ChatCompletion.create( model="gpt-3.5-turbo", temperature=0, messages=[ { "role": "user", "content": "Hey, how are you doing?", } ] ) ``` -------------------------------- ### Using Variables for Prompt Interpolation (Python) Source: https://github.com/pezzolabs/pezzo/blob/main/docs/client/integrations/openai.mdx Demonstrates how to provide variables via `pezzo_options` for the Pezzo client to interpolate within the prompt before sending it to OpenAI. ```python response = openai.ChatCompletion.create( ..., pezzo_options={ "variables": { "age": 22, "country": "France" } } ) ``` -------------------------------- ### LangChain Integration with Pezzo Proxy Source: https://github.com/pezzolabs/pezzo/blob/main/docs/features/langchain.mdx Demonstrates how to configure LangChain's ChatOpenAI model to use the Pezzo proxy for observability. This involves setting the `baseURL` to the Pezzo proxy endpoint and providing Pezzo API key, project ID, and environment details in the headers. ```ts import { ChatOpenAI } from "langchain/chat_models/openai"; const llm = new ChatOpenAI({ openAIApiKey: process.env.OPENAI_API_KEY, temperature: 0, configuration: { baseURL: "https://proxy.pezzo.ai/openai/v1", defaultHeaders: { "X-Pezzo-Api-Key": "", "X-Pezzo-Project-Id": "", "X-Pezzo-Environment": "Production", }, }, }); const llmResult = await llm.predict("Tell me 5 fun facts about yourself!"); ``` ```py from langchain.chat_models import ChatOpenAI llm = ChatOpenAI( openai_api_key='<>', openai_api_base="https://proxy.pezzo.ai/openai/v1", default_headers={ "X-Pezzo-Api-Key": "", "X-Pezzo-Project-Id": "", "X-Pezzo-Environment": "Production", } ) llm_result = llm.predict("Tell me 5 fun facts about yourself!") ``` -------------------------------- ### Making OpenAI Requests with Prompt Management (Python) Source: https://github.com/pezzolabs/pezzo/blob/main/docs/client/integrations/openai.mdx Shows how to retrieve a prompt from Pezzo and utilize it for an OpenAI request, with the ability to override specific parameters. ```python from pezzo.client import pezzo from pezzo.openai import openai prompt = pezzo.get_prompt("PromptName") response = openai.ChatCompletion.create( pezzo_prompt=prompt ) response = openai.ChatCompletion.create( pezzo_prompt=prompt, model="gpt-4" ) ``` -------------------------------- ### Run Unit Tests Source: https://github.com/pezzolabs/pezzo/blob/main/libs/kafka/README.md Executes the unit tests for the Kafka library using the Jest testing framework. ```bash nx test kafka ``` -------------------------------- ### Making OpenAI Requests without Prompt Management (Node.js) Source: https://github.com/pezzolabs/pezzo/blob/main/docs/client/integrations/openai.mdx Illustrates how to make direct requests to OpenAI using the PezzoOpenAI instance, benefiting from Pezzo's observability features without prompt management. ```typescript const response = await openai.chat.completions.create({ model: "gpt-3.5-turbo", temperature: 0, messages: [ { role: "user", content: "Hey, how are you doing?", }, ], }); ``` -------------------------------- ### Run Lint Source: https://github.com/pezzolabs/pezzo/blob/main/libs/kafka/README.md Executes the linting process for the Kafka library using ESLint to check for code quality and style issues. ```bash nx lint kafka ``` -------------------------------- ### Clone Pezzo Repository Source: https://github.com/pezzolabs/pezzo/blob/main/docs/deployment/docker-compose.mdx Clones the Pezzo repository from GitHub and navigates into the project directory. ```bash git clone https://github.com/pezzolabs/pezzo.git cd pezzo ``` -------------------------------- ### Run Unit Tests for Common Library Source: https://github.com/pezzolabs/pezzo/blob/main/libs/common/README.md Command to execute unit tests for the common library using Jest. This ensures the library's components function as expected. ```bash nx test common ``` -------------------------------- ### Run Unit Tests for Common Library Source: https://github.com/pezzolabs/pezzo/blob/main/libs/types/README.md Command to execute unit tests for the common library using Jest. This ensures the library's components function as expected. ```bash nx test common ``` -------------------------------- ### Prompt Settings - Provider Configuration Source: https://github.com/pezzolabs/pezzo/blob/main/docs/platform/prompt-management/prompt-editor.mdx Users can configure settings specific to the chosen LLM provider. These settings can be tuned and committed to specific versions for automatic retrieval by the Pezzo Client. ```APIDOC Provider Settings: Supported Providers: - OpenAI Chat Completion - Azure OpenAI Chat Completion (Coming Soon) - Anthropic (Coming Soon) Configuration: - Select a provider from the available options. - Provider-specific settings will appear. - Tune these settings as needed. - Commit settings with a specific version. - Pezzo Client automatically fetches committed settings. ``` -------------------------------- ### Watch GraphQL Codegen Source: https://github.com/pezzolabs/pezzo/blob/main/README.md Runs the GraphQL codegen in watch mode to automatically generate types when schema changes occur. This command should be run in a separate terminal. ```bash npm run graphql:codegen:watch ``` -------------------------------- ### Enable Request Caching with Pezzo Source: https://github.com/pezzolabs/pezzo/blob/main/docs/client/integrations/openai.mdx Shows how to enable request caching by setting the 'cache' option to true in the Pezzo client. Caching can significantly reduce API costs and improve execution speed. ```python response = await openai.ChatCompletion.create( ..., pezzo_options={ "cache": True } ) ``` -------------------------------- ### Using Variables for Prompt Interpolation (Node.js) Source: https://github.com/pezzolabs/pezzo/blob/main/docs/client/integrations/openai.mdx Shows how to pass variables to the OpenAI request, which the Pezzo client will use to interpolate placeholders within the prompt. ```typescript const response = await openai.chat.completions.create(..., { variables: { age: 22, country: "France" } }); ``` -------------------------------- ### Add Environmental Variables Source: https://github.com/pezzolabs/pezzo/blob/main/docs/deployment/docker-compose.mdx Appends necessary environmental variables from the 'apps/server/.env' and 'apps/console/.env' files to the root '.env.local' file. ```bash cat apps/server/.env >> .env.local cat apps/console/.env >> .env.local ``` -------------------------------- ### Enable Request Caching in Python Source: https://github.com/pezzolabs/pezzo/blob/main/docs/client/request-caching.mdx Shows how to enable request caching for OpenAI API calls in Python by including the 'X-Pezzo-Cache-Enabled' header with a value of 'true'. ```py chat_completion = openai.chat.completions.create( model="gpt-3.5-turbo", messages=[ { "role": "user", "content": "Tell me 5 fun facts about yourself", } ], headers={ "X-Pezzo-Cache-Enabled": "true" } ) ``` -------------------------------- ### Enable Request Caching with Pezzo Source: https://github.com/pezzolabs/pezzo/blob/main/docs/client/integrations/openai.mdx Shows how to enable request caching by setting the 'cache' option to true in the Pezzo client. Caching can significantly reduce API costs and improve execution speed. ```typescript const response = await openai.chat.completions.create({ ... }, { cache: true }); ``` -------------------------------- ### Enable Request Caching in Node.js Source: https://github.com/pezzolabs/pezzo/blob/main/docs/client/request-caching.mdx Demonstrates how to enable request caching for OpenAI API calls in Node.js by setting the 'X-Pezzo-Cache-Enabled' header to true. ```ts const response = await openai.chat.completions.create({ model: "gpt-3.5-turbo", messages: [ { role: "user", message: "Hello, how are you?" } ] }, { headers: { "X-Pezzo-Cache-Enabled": true, } }); ``` -------------------------------- ### Stage Changes for Commit Source: https://github.com/pezzolabs/pezzo/blob/main/CONTRIBUTING.md Stages all modified files in the current directory and its subdirectories, preparing them to be included in the next commit. ```jsx git add . ``` -------------------------------- ### Push Changes to Remote Repository Source: https://github.com/pezzolabs/pezzo/blob/main/CONTRIBUTING.md This command pushes local changes to the specified remote repository and branch. Ensure you replace 'branch-name-here' with your actual branch name. ```git git push origin branch-name-here ``` -------------------------------- ### Reporting v2 Request Source: https://github.com/pezzolabs/pezzo/blob/main/docs/api-reference/reporting/report-a-request.mdx Defines the POST request for the /reporting/v2/request endpoint. This endpoint is used for submitting reporting data. ```APIDOC openapi: post /reporting/v2/request ``` -------------------------------- ### Prompt Variables Source: https://github.com/pezzolabs/pezzo/blob/main/docs/platform/prompt-management/prompt-editor.mdx Variables can be specified within the prompt content using curly braces. These variables allow for dynamic value replacement when the prompt is called via the Pezzo Client. ```APIDOC Prompt Content Syntax: {variableName} Example: "Hello, {name}! Your score is {score}." Description: - Variables are enclosed in curly braces `{}`. - They enable dynamic data injection into prompts. - Used with the Pezzo Client for LLM interactions. ``` -------------------------------- ### Send Custom Properties to Pezzo Source: https://github.com/pezzolabs/pezzo/blob/main/docs/client/integrations/openai.mdx Demonstrates how to include custom properties such as userId and traceId in API requests sent via the Pezzo client. These properties are visible in the Pezzo UI for filtering and analysis. ```python response = await openai.ChatCompletion.create( ..., pezzo_options={ "properties": { "userId": "some-user-id", "traceId": "some-trace-id" } } ) ``` -------------------------------- ### Conventional Commit Message Structure Source: https://github.com/pezzolabs/pezzo/blob/main/CONTRIBUTING.md Defines the standard format for commit messages, including type, scope (package), and subject. This helps in maintaining a consistent and understandable commit history. ```conventionalcommits (): Example: fix(server): missing entity on init ``` ```conventionalcommits Types: - feat: A new feature - fix: A bug fix - docs: Changes to the documentation - style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc.) - refactor: A code change that neither fixes a bug nor adds a feature - perf: A code change that improves performance - test: Adding missing or correcting existing tests - chore: Changes to the build process or auxiliary tools and libraries such as documentation generation Packages: - server - console - client - types ``` -------------------------------- ### Send Custom Properties to Pezzo Source: https://github.com/pezzolabs/pezzo/blob/main/docs/client/integrations/openai.mdx Demonstrates how to include custom properties such as userId and traceId in API requests sent via the Pezzo client. These properties are visible in the Pezzo UI for filtering and analysis. ```typescript const response = await openai.chat.completions.create({ ... }, { properties: { userId: "some-user-id", traceId: "some-trace-id" } }); ``` -------------------------------- ### Health Check Endpoint Source: https://github.com/pezzolabs/pezzo/blob/main/docs/api-reference/health/performs-a-health-check.mdx Provides the status of the Pezzo service. This endpoint is used to verify if the service is running and operational. ```APIDOC openapi: get /healthz ```