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
.envfile in theappdirectory with variables:OPENAI_ENDPOINTOPENAI_KEY
-
If you want to use DeepSeek Model instead of the default AzureOpenAi model, add the following variables too:
USE_DEEPSEEKand set it totrueDEEPSEEK_ENDPOINTand set it tohttps://api.deepseek.comDEEPSEEK_KEY
-
Before running the service, you’ll need to generate the gRPC code from the
.protofiles 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
.protoFilesgit 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