From e456e28f1640a44ebebd7980b6a0475581e1fa92 Mon Sep 17 00:00:00 2001 From: Mrugesh Mohapatra <1884376+raisedadead@users.noreply.github.com> Date: Wed, 8 Apr 2026 04:03:23 +0530 Subject: [PATCH] fix(api): update socrates endpoint (#66849) --- api/src/routes/protected/socrates.ts | 2 +- sample.env | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/api/src/routes/protected/socrates.ts b/api/src/routes/protected/socrates.ts index 230bfd679ab..5573e3f78fd 100644 --- a/api/src/routes/protected/socrates.ts +++ b/api/src/routes/protected/socrates.ts @@ -95,7 +95,7 @@ export const socratesRoutes: FastifyPluginCallbackTypebox = ( }; try { - const response = await fetch(SOCRATES_ENDPOINT, { + const response = await fetch(`${SOCRATES_ENDPOINT}/hint`, { method: 'POST', headers: { 'Content-Type': 'application/json', diff --git a/sample.env b/sample.env index c721865e2a5..87b10d1cd9a 100644 --- a/sample.env +++ b/sample.env @@ -36,8 +36,8 @@ GROWTHBOOK_FASTIFY_API_HOST=fastify_api_sdk_api_host_from_growthbook_dashboard GROWTHBOOK_FASTIFY_CLIENT_KEY=fastify_api_sdk_client_key_from_growthbook_dashboard # Socrates (AI-powered hints) -SOCRATES_API_KEY=socrates_api_key_from_dashboard -SOCRATES_ENDPOINT=https://librarian-v1.freecodecamp.org/hint +SOCRATES_API_KEY=something +SOCRATES_ENDPOINT=https://localhost:4000 # Application paths HOME_LOCATION=http://localhost:8000