mirror of
https://github.com/trycua/computer.git
synced 2026-02-18 12:28:51 -06:00
Assert Cua API keys exist in notebook
This commit is contained in:
@@ -106,18 +106,21 @@
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import logging\n",
|
||||
"from pathlib import Path\n",
|
||||
"import os\n",
|
||||
"\n",
|
||||
"from pathlib import Path\n",
|
||||
"from agent import ComputerAgent\n",
|
||||
"from computer import Computer, VMProviderType\n",
|
||||
"\n",
|
||||
"api_key = os.getenv(\"CUA_API_KEY\")\n",
|
||||
"container_name = os.getenv(\"CUA_CONTAINER_NAME\")\n",
|
||||
"assert api_key and container_name\n",
|
||||
"\n",
|
||||
"# Connect to your existing cloud container\n",
|
||||
"computer = Computer(\n",
|
||||
" os_type=\"linux\",\n",
|
||||
" provider_type=VMProviderType.CLOUD,\n",
|
||||
" api_key=os.getenv(\"CUA_API_KEY\"),\n",
|
||||
" name=os.getenv(\"CUA_CONTAINER_NAME\"),\n",
|
||||
" api_key=api_key,\n",
|
||||
" name=container_name,\n",
|
||||
" verbosity=logging.INFO\n",
|
||||
")\n",
|
||||
"\n",
|
||||
|
||||
Reference in New Issue
Block a user