GPT's function calling feature wrapper
Project description
# CallingGPT
GPT’s Function Calling - the proof-of-concept.
> Read this guide before you start: [function-calling](https://platform.openai.com/docs/guides/gpt/function-calling)
## Abstract
OpenAI’s GPT models provide a function calling feature, so we can easily create ChatGPT Plugins like tools. This repository is a proof-of-concept of the function calling feature. In this experiment, we defined the Plugin as Namespace which contains a serial of functions. While user performing a conversation, the functions in Namespace will be called by the API and return the result to the user.
## Usage
Clone this repository and install the dependencies.
`bash git clone https://github.com/RockChinQ/CallingGPT cd CallingGPT pip install -r requirements.txt `
Run the main.py to generate config.yaml
`bash python main.py `
Edit the config.yaml to set your API key and other settings.
Run the main.py and pass your modules.
`bash python main.py <module0> <module1> ... `
## Example
Use the example/greet.py
`bash python main.py example/greet.py `
Then you can talk to the bot.
` $ python main.py examples/greet.py Using module: examples.greet >>> hello and who are you? <<< Hello! I am an AI assistant here to help you. How may I assist you today? >>> say hello to Rock func<examples.greet.greet>: Hello, Rock! >>> and to Alice func<examples.greet.greet>: Hello, Alice! >>> `
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file CallingGPT-0.0.0.1.tar.gz
.
File metadata
- Download URL: CallingGPT-0.0.0.1.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5dadd6ce5f22d091d1e64a0a77ed51678306aea3a40a15b0114646355375a2aa |
|
MD5 | d7be34d7efd191545429af66e418b7eb |
|
BLAKE2b-256 | 71b7a3fa221145ef0cddae5ca63caa80bfdfb82dcc8d57064e4deb238a4e341b |
File details
Details for the file CallingGPT-0.0.0.1-py3-none-any.whl
.
File metadata
- Download URL: CallingGPT-0.0.0.1-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c67bcdeeca7e837a322a20da6f17822787a2561a11a7c09ccf81a64ed416691a |
|
MD5 | b0d3e646f9dea7923da689fc7a1925ec |
|
BLAKE2b-256 | 33fdf7cfabcc18eae2ffccb576676f65e672f685c7fdb97b5cda5e2f90128368 |