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
Hashes for CallingGPT-0.0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c67bcdeeca7e837a322a20da6f17822787a2561a11a7c09ccf81a64ed416691a |
|
MD5 | b0d3e646f9dea7923da689fc7a1925ec |
|
BLAKE2b-256 | 33fdf7cfabcc18eae2ffccb576676f65e672f685c7fdb97b5cda5e2f90128368 |