Copilot Installation
Overview
The getting started guide for the Copilot API is a tool that allows interaction with a bot that selects the appropriate tool to answer a query.
Etendo Copilot
Javapackage: com.etendoerp.copilot
Requirements
- Etendo Classic. If you do not have it, you can install it using the Etendo Installation Developer Guide.
- Python version ^3.10, to install it follow The Official Installation Guide.
- Docker to install it follow The Official Installation Guide
Run copilot locally
-
Add copilot dependency in the Etendo Classic project, In
build.gradle
, add: -
In the terminal, execute:
-
In
gradle.properties
file is necessary to add some environment variables as a mandatory requirementEnvironment Variable Options Info COPILOT_PORT 5000
Required The copilot port can be defined by the user OPENAI_API_KEY ***********************
Required You can get it from OpenAI API keys -
In addition, there are other optional variables to configure certain aspects of the copilot. If not specified, default values are used.
Environment Variable Options Default Info SYSTEM_PROMPT String
"You are a very powerful assistant with a set of tools, which you will try to use for the requests made to you."
The prompt that will be used to make the request to the agent and that will condition the response and behavior of the copilot. CONFIGURED_TOOLS_FILENAME JSON File name
tools_config.json
The name of the file that contains the configuration of the enabled tools. DEPENDENCIES_TOOLS_FILENAME TOML File name
tools_deps.toml
The name of the file that contains the configuration of the dependencies of the tools. COPILOT_IMAGE_TAG String
master
The tag of the copilot docker image that will be used. COPILOT_PULL_IMAGE Boolean
true
If true, the copilot docker image will be pulled from docker hub. If false, gradle will try to use the local image with the tag specified in COPILOT_IMAGE_TAG, but if it does not exist, it will be pulled from docker hub. COPILOT_DOCKER_CONTAINER_NAME String
etendo-default
The name of the docker container that will be created to run the copilot docker image. -
To download the latest copilot Docker image and run it:
-
You can now send prompts to the copilot using the following command:
Where
prompt
is the prompt you want to send to the copilot.For example:
The copilot will detect the tool that best suits the prompt and will return the response of the tool.
In the following example, we can see how the copilot detects that the tool that best suits the prompt is the
HelloWorldTool
(a default tool) and returns the response of the tool:Another screenshot from the Copilot side, where we can see how the copilot detects that the tool that best suits the prompt is the
HelloWorldTool
: -
When done using Etendo Copilot, run:
This command will stop the Docker container running Copilot.