From 4114eb6c5bd211ffbb6ef2bd06e12d6cc64c2f74 Mon Sep 17 00:00:00 2001 From: Cosmin Paunel Date: Fri, 6 Mar 2026 14:15:46 +0200 Subject: [PATCH] fix: remove incorrect OpenAI API key requirement from docs and samples UiPathChatOpenAI routes all requests through UiPath's LLM Gateway, so no OpenAI API key is needed. Removed misleading references from quick_start.md and added an info box clarifying that an OPENAI_API_KEY is only required when using the OpenAI client directly. - Removed OpenAI API key from prerequisites in quick_start.md - Removed the "Set Up Environment Variables" section - Added info box explaining UiPathChatOpenAI vs direct OpenAI usage - Removed agent-as-tools .env.example (uses UiPathChatOpenAI, no env needed) - Updated rag-assistant .env.example to clarify direct OpenAI client usage Co-Authored-By: Claude Opus 4.6 --- .../uipath-openai-agents/docs/quick_start.md | 18 ++---------------- .../samples/agent-as-tools/.env.example | 5 ----- .../samples/rag-assistant/.env.example | 3 ++- 3 files changed, 4 insertions(+), 22 deletions(-) delete mode 100644 packages/uipath-openai-agents/samples/agent-as-tools/.env.example diff --git a/packages/uipath-openai-agents/docs/quick_start.md b/packages/uipath-openai-agents/docs/quick_start.md index 13410db8..8adfe972 100644 --- a/packages/uipath-openai-agents/docs/quick_start.md +++ b/packages/uipath-openai-agents/docs/quick_start.md @@ -11,11 +11,10 @@ Before proceeding, ensure you have the following installed: - Python 3.11 or higher - `pip` or `uv` package manager - A UiPath Automation Cloud account with appropriate permissions -- An OpenAI API key /// info - **OpenAI** - Generate an OpenAI API key [here](https://platform.openai.com). - /// +The generated boilerplate uses `UiPathChatOpenAI`, which routes all LLM requests through the **UiPath LLM Gateway**. No OpenAI API key is required — authentication is handled via `uipath auth`. If you choose to use the OpenAI client directly (without `UiPathChatOpenAI`), you will need to configure an `OPENAI_API_KEY` environment variable. +/// ## Creating a New Project @@ -104,7 +103,6 @@ Generate your first UiPath OpenAI agent: ✓ Created 'main.py' file. ✓ Created 'openai_agents.json' file. ✓ Created 'pyproject.toml' file. -🔧 Please ensure to define OPENAI_API_KEY in your .env file. 💡 Initialize project: uipath init 💡 Run agent: uipath run agent '{"messages": "Hello"}' ``` @@ -138,18 +136,6 @@ This command creates the following files: | `uipath.json` | Input/output JSON schemas and bindings. | | `agent.mermaid` | Graph visual representation. | -## Set Up Environment Variables - -Before running the agent, configure `OPENAI_API_KEY` in the `.env` file: - -//// tab | Open AI - -``` -OPENAI_API_KEY=sk-proj-...... -``` - -//// - ## Authenticate With UiPath diff --git a/packages/uipath-openai-agents/samples/agent-as-tools/.env.example b/packages/uipath-openai-agents/samples/agent-as-tools/.env.example deleted file mode 100644 index a0ff8895..00000000 --- a/packages/uipath-openai-agents/samples/agent-as-tools/.env.example +++ /dev/null @@ -1,5 +0,0 @@ -# OpenAI API Configuration -OPENAI_API_KEY=your-api-key-here - -# Optional: Set custom API endpoint -# OPENAI_API_BASE=https://api.openai.com/v1 diff --git a/packages/uipath-openai-agents/samples/rag-assistant/.env.example b/packages/uipath-openai-agents/samples/rag-assistant/.env.example index 4ed32aad..3e96dd07 100644 --- a/packages/uipath-openai-agents/samples/rag-assistant/.env.example +++ b/packages/uipath-openai-agents/samples/rag-assistant/.env.example @@ -1,3 +1,4 @@ -# OpenAI API Key +# This sample uses the OpenAI client directly (without UiPathChatOpenAI), +# so an OpenAI API key is required. # Get your API key from https://platform.openai.com/api-keys OPENAI_API_KEY=sk-...