This project explored building an AI assistant service compatible with the ChatGPT plugin protocol. The goal was to enable interoperability and reuse of existing ChatGPT plugins within our own assistant framework.
Over time, however, we observed that the ChatGPT plugin ecosystem did not gain significant adoption, and the broader developer and user community shifted toward other integration models (such as APIs, custom tools, or native integrations). As a result, maintaining this project no longer aligns with our priorities.
We are archiving the repository to preserve the work for reference, but we do not plan to continue active development.
The DIAL Assistant Service is designed to respond to user queries, like ChatGPT. It is accessible via DIAL API. The service’s distinctive feature is its ability to utilize addons provided in the user request, enhancing its capability to gather and process information.
Upon receiving a user request, the service employs the specified LLM to interpret and respond to the inquiry. Along with user request it instructs the model on how to apply the provided addons to garner additional information. If the model decides to use an addon to seek specific details, the Assistant Service promptly executes this task and channels the acquired data back to the model. This iterative procedure continues, with the model leveraging the addons to assemble more information until a thorough and informed response to the user’s query is generated.
In essence, the DIAL Assistant Service is a versatile tool that combines the power of a given model with the extended capabilities of various addons to deliver comprehensive and accurate answers.
import os
import openai
if __name__ == "__main__":
response = openai.ChatCompletion.create(
api_base=os.environ["OPENAI_API_BASE"],
api_type="azure",
api_version="2023-03-15-preview",
api_key=os.environ["OPENAI_API_KEY"],
engine="assistant",
model="gpt-4",
temperature=0,
timeout=300,
messages=[
{"role": "user", "content": "What's up?"},
],
addons=[
{
"url": "https://<addon-host>/.well-known/ai-plugin.json"
}
],
)
print(response)This project uses Python>=3.11 and Poetry>=1.6.1 as a dependency manager.
Check out Poetry's documentation on how to install it on your system before proceeding.
To install requirements:
make install
This will install all requirements for running the package, linting, formatting and tests.
As of now, Windows distributions do not include the make tool. To run make commands, the tool can be installed using the following command (since Windows 10):
winget install GnuWin32.MakeFor convenience, the tool folder can be added to the PATH environment variable as C:\Program Files (x86)\GnuWin32\bin.
The command definitions inside Makefile should be cross-platform to keep the development environment setup simple.
Run the development server:
make serveCopy .env.example to .env and customize it for your environment:
| Variable | Default | Description |
|---|---|---|
| CONFIG_DIR | aidial_assistant/configs | Configuration directory |
| LOG_LEVEL | INFO | Log level. Use DEBUG for dev purposes and INFO in prod |
| OPENAI_API_BASE | OpenAI API Base | |
| WEB_CONCURRENCY | 1 | Number of workers for the server |
| TOOLS_SUPPORTING_DEPLOYMENTS | Comma-separated deployment names that support tools in chat completion request |
Run the server in Docker:
make docker_serveRun the linting before committing:
make lintTo auto-fix formatting issues run:
make formatRun unit tests locally:
make testTo remove the virtual environment and build artifacts:
make clean