deboboy / search-for-intelligence

A complete redesign of the original Nextjs web application. This version will be LLM evaluation based; with features to score and store experiment runs.
0 stars 0 forks source link

[bug] Fix Replicate chat response #2

Closed deboboy closed 4 days ago

deboboy commented 1 week ago

Reference this pattern to fix the Replicate response issue.

https://replicate.com/docs/guides/nextjs

deboboy commented 4 days ago

Update: @lab from the OpenRouter Discord community helped solve this issue; for OpenRouter and Replicate endpoints.

Apparently AWS Amplify Gen2 requires new env variable setup; see Branch Environment section here: https://docs.amplify.aws/react/deploy-and-host/fullstack-branching/secrets-and-vars/#branch-environment-2

Specifically these needed to be added to the build commands:

- echo "REPLICATE_API_TOKEN=$REPLICATE_API_TOKEN" >> .env
- echo "OPENROUTER_API_KEY=$OPENROUTER_API_KEY" >> .env