Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 56ad7bd

Browse files
committed
docs: update readme
1 parent 9b0bccb commit 56ad7bd

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

‎README.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
# OpenAI Function Calling example in Node.js
2+
23
This repository contains a basic Node.js example demonstrating how to call functions using the OpenAI API. The example showcases a conversation with the OpenAI GPT-3.5 Turbo model, including making function calls and processing their responses.
34

5+
## Whats New?
6+
7+
- Uses `tools` and `tool_choice`
8+
- Supports parallel function calling
9+
410
## Getting Started
511

612
**Dependencies**: This project has no external dependencies, making it lightweight and easy to set up. You can run this example with just Node.js. However, if you have a preferred library or tool for making HTTP requests, feel free to integrate it as needed to enhance the functionality or suit your specific requirements.
@@ -15,18 +21,26 @@ To get started with this example:
1521

1622
2. Obtain an API key from <a href="https://platform.openai.com/account/api-keys">OpenAI</a>
1723

18-
3. Replace ```Bearer sk-xxxxxxxxx``` in the code with your API key.
24+
3. Replace `Bearer sk-xxxxxxxxx` in the code with your API key.
1925

20-
4. Run the example:
26+
### Parallel Function calling (Uses tools and tool_choice):
2127

2228
```shell
2329
node index.js
2430
```
2531

32+
### Single Function call (Deprecated) (Uses function_call and functions):
33+
34+
```shell
35+
node index[Deprecated].js
36+
```
37+
2638
5. Customise the functions and conversation as needed. In this example, a simple weather-related function is included, but you can add more functions to suit your use case.
2739

2840
## Usage
41+
2942
This repository serves as a starting point for understanding how to integrate function calls into your conversational AI system using the OpenAI GPT-3.5 Turbo model. You can extend the example by adding more functions, handling different types of requests, and tailoring it to your specific application.
3043

3144
## License
45+
3246
This project is licensed under the MIT License - see the LICENSE file for details.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /