This is the execution service for the Chatbot Builder, responsible for executing the chatbot flow logic such as LLM generation calls, and other processing tasks.
-
Add
.env
file in theapp
directory with variables:OPENAI_ENDPOINT
OPENAI_KEY
-
If you want to use DeepSeek Model instead of the default AzureOpenAi model, add the following variables too:
USE_DEEPSEEK
and set it totrue
DEEPSEEK_ENDPOINT
and set it tohttps://api.deepseek.com
DEEPSEEK_KEY
-
Before running the service, you’ll need to generate the gRPC code from the
.proto
files to ensure the service can communicate with other services.
To generate the necessary gRPC code for Python, follow these steps:
-
Clone or Pull the Latest
.proto
Filesgit clone https://github.com/Chatbot-Builder-Project/chatbot-builder-protos.git
Or if you already have the repository:
cd chatbot-builder-protos git pull cd ..
-
Create Directory Structure
mkdir -p app/generated/v1
-
Generate Python gRPC Code
python -m grpc_tools.protoc --proto_path=chatbot-builder-protos/protos --python_out=app/generated --grpc_python_out=app/generated chatbot-builder-protos/protos/v1/executor/*.proto
-
Fix Imports
Get-ChildItem -Path "app/generated/v1/executor/" -Filter "*_pb2*.py" | ForEach-Object { (Get-Content $_.FullName) -replace "from v1\.executor", "from app.generated.v1.executor" | Set-Content $_.FullName }
docker-compose up --build