Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix small Next.js x TypeScript nits #5

Merged
merged 1 commit into from
May 2, 2024

Conversation

jaredpalmer
Copy link
Contributor

  • Only instantiate one OpenAI client and then import it everywhere
  • Use destructuring when possible in Route Handlers
  • Use Response.json() instead new Response(JSON.stringify())
  • Use TypeScript paths to simplify imports

@romainhuet
Copy link
Contributor

Fantastic! Thank you @jaredpalmer! 🙏

@romainhuet romainhuet merged commit e5b843c into openai:main May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants