Giter VIP home page Giter VIP logo

watch-this's Introduction

How it works

This project uses the OpenAI GPT-3 API (specifically, text-davinci-003) and Vercel Edge functions with streaming. It generates 5 cinema recommendations based on the form and user input, sends it to the GPT-3 API via a Vercel Edge function, then streams the response back to the application.

Running Locally

After cloning the repo, go to OpenAI to make an account and put your API key in a file called .env.

For example:

OPENAI_API_KEY=...

Then, run the application in the command line and it will be available at http://localhost:5173.

npm run dev

Deploy Instantly on Vercel

Deploy with Vercel

watch-this's People

Contributors

brandonweis avatar folafunmi-db avatar samselikoff avatar stephdietz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

watch-this's Issues

suggestion: upadte to support gpt-3.5-turbo model

The newer gpt-3.5-turbo model is cheaper to run and should be more powerful however it has a different api response.
Suggest that you update the API to support this. I tried modifying myself but ran into some issues. If I do fix this I will submit a pull request

Add LICENSE.md

Hi, great work on this project, love it!

You should considering adding a license to the project, without a license it is effectively copyrighted to you and using/forking it is not as liberal as you maybe want it to be 😄

It has failed to build when I use Vercel to deploy.

[08:34:36.716] Running build in Washington, D.C., USA (East) – iad1
[08:34:36.771] Cloning github.com/Oliverwqcwrw/Movie-Recommended (Branch: main, Commit: 6738bd1)
[08:34:37.051] Previous build cache not available
[08:34:37.336] Cloning completed: 564.721ms
[08:34:37.476] Running "vercel build"
[08:34:37.921] Vercel CLI 28.16.15
[08:34:38.488] Installing dependencies...
[08:34:43.757]
[08:34:43.758] added 292 packages in 5s
[08:34:43.758]
[08:34:43.758] 54 packages are looking for funding
[08:34:43.758] run npm fund for details
[08:34:43.778] Detected package-lock.json generated by npm 7+...
[08:34:43.778] Running "npm run build"
[08:34:44.079]
[08:34:44.079] > [email protected] build
[08:34:44.079] > vite build
[08:34:44.079]
[08:34:44.932]
[08:34:44.936] �[36mvite v4.0.4 �[32mbuilding for production...�[36m�[39m
[08:34:44.962] transforming...
[08:34:45.558] 12:34:45 AM [vite-plugin-svelte] /src/lib/Home.svelte:15:2 Security: Anchor with "target=_blank" should have rel attribute containing the value "noreferrer"
[08:34:45.558] 13: Get recommendations
[08:34:45.558] 14:
[08:34:45.558] 15: <a
[08:34:45.559] ^
[08:34:45.559] 16: href="https://www.youtube.com/watch?v=Z3LrfdctOpU"
[08:34:45.559] 17: target="_blank"
[08:34:45.740] 12:34:45 AM [vite-plugin-svelte] /src/lib/LoadingCard.svelte:83:1 Unused CSS selector "body"
[08:34:45.740] 81:
[08:34:45.741] 82: <style>
[08:34:45.741] 83: body {
[08:34:45.741] ^
[08:34:45.741] 84: font-family: 'Inter', sans-serif;
[08:34:46.875] �[32m✓�[39m 54 modules transformed.
[08:34:46.876] 12:34:46 AM [vite-plugin-svelte] dom compile done.
[08:34:46.876] package files time avg
[08:34:46.876] tv-recs-openai 13 0.50s 38.2ms
[08:34:46.953] rendering chunks...
[08:34:47.028]
[08:34:47.032] �[36mvite v4.0.4 �[32mbuilding SSR bundle for production...�[36m�[39m
[08:34:47.043] transforming...
[08:34:47.229] 12:34:47 AM [vite-plugin-svelte] /src/lib/Home.svelte:15:2 Security: Anchor with "target=_blank" should have rel attribute containing the value "noreferrer"
[08:34:47.230] 13: Get recommendations
[08:34:47.230] 14:
[08:34:47.230] 15: <a
[08:34:47.230] ^
[08:34:47.230] 16: href="https://www.youtube.com/watch?v=Z3LrfdctOpU"
[08:34:47.230] 17: target="_blank"
[08:34:47.272] 12:34:47 AM [vite-plugin-svelte] /src/lib/LoadingCard.svelte:83:1 Unused CSS selector "body"
[08:34:47.272] 81:
[08:34:47.272] 82: <style>
[08:34:47.272] 83: body {
[08:34:47.272] ^
[08:34:47.273] 84: font-family: 'Inter', sans-serif;
[08:34:47.273] 85: }
[08:34:47.537] �[32m✓�[39m 62 modules transformed.
[08:34:47.537] 12:34:47 AM [vite-plugin-svelte] ssr compile done.
[08:34:47.537] package files time avg
[08:34:47.539] tv-recs-openai 13 80.8ms 6.2ms
[08:34:47.539] �[31m"OMDB_API_KEY" is not exported by "�$env/static/private", imported by "src/routes/api/getMediaDetails/+server.ts".�[39m
[08:34:47.539] file: �[36m/vercel/path0/src/routes/api/getMediaDetails/+server.ts:1:9�[39m
[08:34:47.539] �[33m1: import { OMDB_API_KEY } from '$env/static/private';
[08:34:47.540] ^
[08:34:47.540] 2: import { json } from '@sveltejs/kit';�[39m
[08:34:47.540] �[31m[vite-plugin-sveltekit-compile] "OMDB_API_KEY" is not exported by "�$env/static/private", imported by "src/routes/api/getMediaDetails/+server.ts".�[39m
[08:34:47.540] file: �[36m/vercel/path0/src/routes/api/getMediaDetails/+server.ts:1:9�[39m
[08:34:47.541] ^
[08:34:47.541] 2: import { json } from '@sveltejs/kit';�[39m
[08:34:47.541] �[31merror during build:
[08:34:47.541] RollupError: "OMDB_API_KEY" is not exported by "�$env/static/private", imported by "src/routes/api/getMediaDetails/+server.ts".
[08:34:47.541] at error (file:///vercel/path0/node_modules/rollup/dist/es/shared/rollup.js:2041:30)
[08:34:47.541] at Module.error (file:///vercel/path0/node_modules/rollup/dist/es/shared/rollup.js:13062:16)
[08:34:47.541] at Module.traceVariable (file:///vercel/path0/node_modules/rollup/dist/es/shared/rollup.js:13445:29)
[08:34:47.541] at ModuleScope.findVariable (file:///vercel/path0/node_modules/rollup/dist/es/shared/rollup.js:11926:39)
[08:34:47.541] at FunctionScope.findVariable (file:///vercel/path0/node_modules/rollup/dist/es/shared/rollup.js:6761:38)
[08:34:47.542] at ChildScope.findVariable (file:///vercel/path0/node_modules/rollup/dist/es/shared/rollup.js:6761:38)
[08:34:47.542] at Identifier.bind (file:///vercel/path0/node_modules/rollup/dist/es/shared/rollup.js:7855:40)
[08:34:47.542] at TemplateLiteral.bind (file:///vercel/path0/node_modules/rollup/dist/es/shared/rollup.js:5649:28)
[08:34:47.542] at VariableDeclarator.bind (file:///vercel/path0/node_modules/rollup/dist/es/shared/rollup.js:5653:23)
[08:34:47.542] at VariableDeclaration.bind (file:///vercel/path0/node_modules/rollup/dist/es/shared/rollup.js:5649:28)�[39m
[08:34:47.577] Error: Command "npm run build" exited with 1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.