Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/morellexf13/openai-wrapper

☄️ Simple OpenAI & Azure OpenAI Node.Js Wrapper
https://github.com/morellexf13/openai-wrapper

ai azure nodejs openai wrapper

Last synced: about 22 hours ago
JSON representation

☄️ Simple OpenAI & Azure OpenAI Node.Js Wrapper

Awesome Lists containing this project

README

        







☄️


OpenAI Wrapper








Simple OpenAI & Azure OpenAI Node.Js Wrapper





### Getting Started

1- Install Dependencies

```bash
npm install
```

### Setup environment

2- Create a .env file in the project root and add the following:

```bash
OPENAI_API_KEY=

# OR (for Azure)

AZURE_OPENAI_API_KEY=
AZURE_OPENAI_ENDPOINT=
AZURE_OPENAI_DEPLOYMENT=
```

3- Adjust temperature and top_p

4- Edit the system (optional) and user prompt

*Prompt sample*
```
Tell me a joke about programming
```

5- Call completions by running:

```bash
npm start
```