diff --git a/agenta-web/src/code_snippets/endpoints/fetch_config/curl.ts b/agenta-web/src/code_snippets/endpoints/fetch_config/curl.ts index d7d09260b3..13de78483e 100644 --- a/agenta-web/src/code_snippets/endpoints/fetch_config/curl.ts +++ b/agenta-web/src/code_snippets/endpoints/fetch_config/curl.ts @@ -1,6 +1,6 @@ export default function cURLCode(baseId: string, env_name: string): string { return ` - curl -X GET "https://cloud.agenta.ai/api/configs?base_id=${baseId}&environment_name=${env_name}" \\ + curl -X GET "${process.env.NEXT_PUBLIC_AGENTA_API_URL}/api/configs?base_id=${baseId}&environment_name=${env_name}" \\ -H "Authorization: Bearer YOUR_API_KEY" \\ -H "Content-Type: application/json" \\ --connect-timeout 60 diff --git a/agenta-web/src/code_snippets/endpoints/fetch_config/python.ts b/agenta-web/src/code_snippets/endpoints/fetch_config/python.ts index 1fbb904e33..5f56871fa7 100644 --- a/agenta-web/src/code_snippets/endpoints/fetch_config/python.ts +++ b/agenta-web/src/code_snippets/endpoints/fetch_config/python.ts @@ -1,7 +1,7 @@ export default function pythonCode(baseId: string, env_name: string): string { return ` # os.environ["AGENTA_API_KEY"] = "your_api_key" # Only when using cloud - # os.environ["AGENTA_HOST"] = "https://cloud.agenta.ai" + # os.environ["AGENTA_HOST"] = "${process.env.NEXT_PUBLIC_AGENTA_API_URL}" from agenta import Agenta ag = Agenta() diff --git a/agenta-web/src/code_snippets/endpoints/fetch_config/typescript.ts b/agenta-web/src/code_snippets/endpoints/fetch_config/typescript.ts index ae1b27b885..b2f401244e 100644 --- a/agenta-web/src/code_snippets/endpoints/fetch_config/typescript.ts +++ b/agenta-web/src/code_snippets/endpoints/fetch_config/typescript.ts @@ -6,7 +6,7 @@ export default function tsCode(baseId: string, env_name: string): string { const getConfig = async (baseId: string, environmentName: string) => { try { - const baseUrl = 'https://cloud.agenta.ai/api'; + const baseUrl = '${process.env.NEXT_PUBLIC_AGENTA_API_URL}/api'; const params = { base_id: baseId, environment_name: environmentName diff --git a/agenta-web/src/pages/apps/[app_id]/testsets/index.tsx b/agenta-web/src/pages/apps/[app_id]/testsets/index.tsx index 455829ed73..ab165ebd1a 100644 --- a/agenta-web/src/pages/apps/[app_id]/testsets/index.tsx +++ b/agenta-web/src/pages/apps/[app_id]/testsets/index.tsx @@ -118,11 +118,15 @@ export default function Testsets() { {testsets.length > 0 && ( - + - +