Use an Open AI calls in a monorepo #6075
Replies: 2 comments
-
It's likely that you have your application paths mixed up here. Do you have a reproduction we could look at? |
Beta Was this translation helpful? Give feedback.
0 replies
-
Closing due to staleness. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi team!
I have a monorepo with 3 project. These project use the same approach to make calls in OpenAI. As these projects use the same code to make this call. My idea was to get this code in common with the packages directory. For more context this is the structure of my monorepo:
|
apps
| |
| app1
| app2
| app3
|
packages
| |
| shared-code/app/api/prompt.ts
I followed this documentation to set it up when the projects were separate and it worked. https://nextjs.org/docs/app/building-your-application/routing/route-handlers
But when I add the same configuration in the "shared-code" project I get a 404 error. I suspect that the cause is that it does not find the defined path because it is in a monorepo.
My question is: Do you know if it is possible (do you have any example) to make a configuration of this type and that it works in a monorepo?
Thanks,
Beta Was this translation helpful? Give feedback.
All reactions