mirror of
https://github.com/trycua/computer.git
synced 2025-12-31 02:19:58 -06:00
Rename environment variables to follow convention
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
OPENAI_KEY=
|
||||
CUA_KEY=
|
||||
OPENAI_API_KEY=
|
||||
CUA_API_KEY=
|
||||
CUA_CONTAINER_NAME=
|
||||
@@ -19,8 +19,8 @@ This example demonstrates how to control a cua Cloud container using the OpenAI
|
||||
|
||||
2. **Set up environment variables:**
|
||||
Create a `.env` file with the following variables:
|
||||
- `OPENAI_KEY` — your OpenAI API key
|
||||
- `CUA_KEY` — your cua Cloud API key
|
||||
- `OPENAI_API_KEY` — your OpenAI API key
|
||||
- `CUA_API_KEY` — your cua Cloud API key
|
||||
- `CUA_CONTAINER_NAME` — the name of your provisioned container
|
||||
|
||||
3. **Run the example:**
|
||||
|
||||
@@ -4,13 +4,13 @@ import { executeAction } from "./helpers";
|
||||
|
||||
import "dotenv/config";
|
||||
|
||||
const openai = new OpenAI({ apiKey: process.env.OPENAI_KEY });
|
||||
const openai = new OpenAI({ apiKey: process.env.OPENAI_API_KEY });
|
||||
|
||||
const COMPUTER_USE_PROMPT = "Open firefox and go to trycua.com";
|
||||
|
||||
// Initialize the Computer Connection
|
||||
const computer = new Computer({
|
||||
apiKey: process.env.CUA_KEY!,
|
||||
apiKey: process.env.CUA_API_KEY!,
|
||||
name: process.env.CUA_CONTAINER_NAME!,
|
||||
osType: OSType.LINUX,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user