Skip to content

Commit

Permalink
Merge pull request #2100 from Agenta-AI/fix/all-broken-uri-issues
Browse files Browse the repository at this point in the history
fix(frontend): Wrong endpoint in deployment fetch prompt
  • Loading branch information
mmabrouk authored Oct 6, 2024
2 parents 4fc4f4e + ac24a0a commit cc1e07d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 6 additions & 2 deletions agenta-web/src/pages/apps/[app_id]/testsets/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,15 @@ export default function Testsets() {

{testsets.length > 0 && (
<Space className={classes.startLink}>
<Link href={`/apps/${appId}/evaluations/results`}>
<Link
href={`/apps/${appId}/evaluations?selectedEvaluation=auto_evaluation`}
>
<Button>Start an Automatic Evaluation</Button>
</Link>

<Link href={`/apps/${appId}/evaluations/human_a_b_testing`}>
<Link
href={`/apps/${appId}/evaluations?selectedEvaluation=human_ab_testing`}
>
<Button>Start a Human Evaluation</Button>
</Link>
</Space>
Expand Down

0 comments on commit cc1e07d

Please sign in to comment.