GithubHelp home page GithubHelp logo

bruno-openai's Introduction

Bruno setup

Install bruno with brew install bruno.

Open this repo's collection with Bruno > Open Collection and choose the openai directory.

In the sidebar, click to open openai, Info, and click the request List Models.

In the environment menu on the top-right, select local, then select Configure.

Un-check the Secret checkbox for the one environment variable (OPENAI_API_KEY), and paste in an OpenAI API key. For our offsite, skip getting your own API key and use the shared one I'll paste into the #2024-prod-summit channel. Then re-check the Secret checkbox and Save.

Getting an API key

OpenAI originally had user API keys, but they are deprecated and you'll want to create project-based API keys instead.

Sign up or sign in to OpenAI's website at https://platform.openai.com/.

Then on the /api-keys page, on the top-left, I recommend creating a "Personal" organization and some project even if it's just called "Testing." This will help organize your keys.

If you've just signed up, I believe you have some credits to use for free. If not, go to the Billing page and add a credit card.

Back on the /api-keys page, on the top-left, pick your "Testing" project, then click "Create new secret key." Make it owned by "You" and give it some short hyphenated name.

Note: After you click "Create secret key," you'll have to copy and paste it into your password manager. You won't be able to retrieve it later from the website.

Your first API requests

In the Bruno app, click down to select "List Models" and click the right-arrow near the top-right. The "Response" pane should fill with a list of dozens of available models.

Select "Chat Completion". Under the "Body" tab you'll see the text that gets POSTed. Under "Vars" you'll see the options. Click the right-arrow. The response will take a few seconds. Under "Timeline" you'll see the HTTP request, and under "Response" you'll see the JSON response.

OpenAI Playground

As an alternative to the Bruno collection in this repo, you can work directly on OpenAI's website. This is for experimenting. And you'll need your own API key. Try it here:

https://platform.openai.com/playground

The "Chat" tab is all you'll need at first. "Assistants" and "Fine-tuning" are more advanced ways of customizing OpenAI output.

The "Completions" tab is deprecated, and "Batches" and "Storage" aren't important until you need a high volume of requests or fine-tune your first model.

OpenAI API reference

https://platform.openai.com/docs/api-reference/authentication

bruno-openai's People

Contributors

jamiemccarthy 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.