8000 fix: Update the function code template for OpenAI completion API to work with current packages by dshukertjr · Pull Request #34890 · supabase/supabase · GitHub
[go: up one dir, main page]

Skip to content

fix: Update the function code template for OpenAI completion API to work with current packages #34890

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

Merged
merged 1 commit into from
Apr 16, 2025

Conversation

dshukertjr
Copy link
Member

I have read the CONTRIBUTING.md file.

YES

What kind of change does this PR introduce?

I couldn't get the current function template for openai-completion to work and discovered that the openai npm package is quite outdated, and the model text-davinci-003 is now deprecated. This PR fixes the function to work with the current version.

@dshukertjr dshukertjr requested a review from a team as a code owner April 10, 2025 08:52
Copy link
vercel bot commented Apr 10, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
studio-self-hosted ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 10, 2025 8:52am
studio-staging ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 10, 2025 8:52am
ui-library ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 10, 2025 8:52am
4 Skipped Deployments
Name Status Preview Comments Updated (UTC)
studio ⬜️ Ignored (Inspect) Apr 10, 2025 8:52am
design-system ⬜️ Skipped (Inspect) Apr 10, 2025 8:52am
docs ⬜️ Skipped (Inspect) Apr 10, 2025 8:52am
zone-www-dot-com ⬜️ Skipped (Inspect) Apr 10, 2025 8:52am

Copy link
supabase bot commented Apr 10, 2025

This pull request has been ignored for the connected project xguihxuzqibwxjnimxev because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@dshukertjr dshukertjr requested a review from SaxonF April 10, 2025 08:56
@dshukertjr
Copy link
Member Author
< 8000 td class="d-block comment-body markdown-body js-comment-body">

@SaxonF By the way, where was this code taken from? We might want to update that one as well.

@laktek
Copy link
Contributor
laktek commented Apr 15, 2025

@dshukertjr I think these were AI-generated. I went through them quickly and updated the obvious issues. Can you look at other examples as well?

Ideally, we should update examples in https://github.com/supabase/supabase/tree/master/examples/edge-functions/supabase/functions and load them as templates in future.

@dshukertjr dshukertjr merged commit 6610621 into master Apr 16, 2025
19 checks passed
@dshukertjr dshukertjr deleted the fix/openai-function-template branch April 16, 2025 07:03
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.

3 participants
0