Giter Club home page Giter Club logo

openai-chat-playground's Introduction

Basic chat + function calling playground

Getting started

First, install dependencies npm install

Next, setup appropriate values in your .env.local file:

# Credentials if you want to use OpenAI as your LLM
OPENAI_API_KEY=

# Credentials if you want to use Azure OpenAI as your LLM
AZURE_API_KEY=
AZURE_MODEL_BASE_URL=https://copilot-chat-pool1-ide-westus.openai.azure.com/openai/v1/engines/copilot-gpt-4

# From Supabase (only necessary if you are creating embeddings)
NEXT_PUBLIC_SUPABASE_URL=
SUPABASE_SERVICE_ROLE_KEY=
DATABASE_PASSWORD=
ANON_PUBLIC_KEY=
SERVICE_ROLE_SECRET=

# From GitHub
GITHUB_PAT=

# From Azure (only necessary if you are using Bing search)
BING_SEARCH_ENDPOINT=https://api.bing.microsoft.com/v7.0/search
BING_SEARCH_SUBSCRIPTION_KEY=

Start your local dev server with

npm run dev

Creating new functions

Add new functions to the app/api/chat/functions directory. Then update app/api/chat/functions.ts to include your newly added functions to the availableFunctions set and update the runFunction function to invoke your function with the correct arguments.

openai-chat-playground's People

Contributors

skylar-anderson avatar timrogers avatar

Stargazers

 avatar

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.