Skip to content

Commit e8588e0

Browse files
committed
fixed voice client for new Bedrock API spec and flowise "quickstart" stack to simplify build process
1 parent 2772f5b commit e8588e0

File tree

4 files changed

+13
-16
lines changed

4 files changed

+13
-16
lines changed

examples/app-flowise/README.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,23 @@ Refer to the [Flowise client guide](../../docs/client_guide/Flowise_with_teradat
1313
## Quick start
1414
1. From the repo root run:
1515
```bash
16-
cd examples/app-flowise
17-
cp env .env
16+
# Build the MCP serer docker image (set the ENABLE_FS_MODULE / ENABLE_TDVS_MODULE / ENABLE_TDML_MODULE environment variables to true to enable optional modules)
17+
docker compose build
18+
# Go to the Flowise stack directory (this) and set the configuration
19+
cd examples/app-flowise
20+
cp env .env
1821
```
1922

20-
2. Optional: Edit and update the `.env` file with your preferred configuration details.
23+
1. Optional: Edit and update the `.env` file with your preferred configuration details.
2124
If you don't the Teradata connection details will be inherited from your current environment variables, at least the DATABASE_URI variable is required.
2225

23-
3. Launch the stack with docker compose (this will build MCP server image from `../Dockerfile`):
26+
2. Launch the stack with docker compose (this will build MCP server image from `../Dockerfile`):
2427
:
2528
```bash
2629
export DATABASE_URI=teradata://username:password@host:1025 # Optional - ignore if you have already defined it in your .env file or current profile
2730
docker compose --env-file .env up -d --remove-orphans
2831
```
29-
4. Optional: monitor the logs
32+
1. Optional: monitor the logs
3033
```bash
3134
docker logs teradata-mcp-server -f
3235
docker logs flowise -f

examples/app-flowise/docker-compose.yaml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
services:
22
flowise:
3-
image: flowise:latest
3+
image: flowiseai/flowise:latest
44
restart: always
55
environment:
66
- PORT=${PORT}
@@ -13,8 +13,6 @@ services:
1313
- TD_MCP_SERVER=http://teradata-mcp-server:8001/mcp
1414
ports:
1515
- "${PORT}:${PORT}"
16-
extra_hosts:
17-
- "dbccop1:${DATABASE_HOST}"
1816
container_name: flowise
1917
healthcheck:
2018
test: ['CMD', 'curl', '-f', 'http://localhost:${PORT}/api/v1/ping']
@@ -23,7 +21,7 @@ services:
2321
retries: 5
2422
start_period: 30s
2523
volumes:
26-
- ${DATA_DIR}/.flowise:/root/.flowise
24+
- ${DATA_DIR:-${PWD}/.flowise}:/root/.flowise
2725
teradata-mcp-server:
2826
image: teradata-mcp-server:latest
2927
restart: always
@@ -40,12 +38,10 @@ services:
4038
- TD_PEM=${TD_PEM}
4139
- VS_NAME=${VS_NAME}
4240
container_name: teradata-mcp-server
43-
extra_hosts:
44-
- "dbccop1:${DATABASE_HOST}"
4541
ports:
4642
- "${MCP_PORT}:${MCP_PORT}"
4743
volumes:
48-
- ${TD_PEM}:${TD_PEM}
44+
- ${TD_PEM:-${PWD}}:${TD_PEM:-/root/.td_pem}
4945
tty: true
5046
networks:
5147
default:

examples/app-voice-agent/mcp_voice_client.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from langchain_mcp_adapters.client import MultiServerMCPClient
1717
from langchain_mcp_adapters.tools import load_mcp_tools
1818
from langchain_mcp_adapters.prompts import load_mcp_prompt
19-
from smithy_aws_core.credentials_resolvers.environment import EnvironmentCredentialsResolver
19+
from smithy_aws_core.identity.environment import EnvironmentCredentialsResolver
2020

2121
# Suppress warnings
2222
warnings.filterwarnings("ignore")
@@ -554,8 +554,6 @@ def _initialize_client(self):
554554
endpoint_uri=f"https://bedrock-runtime.{self.region}.amazonaws.com",
555555
region=self.region,
556556
aws_credentials_identity_resolver=EnvironmentCredentialsResolver(),
557-
http_auth_scheme_resolver=HTTPAuthSchemeResolver(),
558-
http_auth_schemes={"aws.auth#sigv4": SigV4AuthScheme()}
559557
)
560558
self.bedrock_client = BedrockRuntimeClient(config=config)
561559

examples/app-voice-agent/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ pyaudio>=0.2.13
22
rx>=3.2.0
33
smithy-aws-core>=0.0.1
44
pytz
5-
aws_sdk_bedrock_runtime
5+
aws_sdk_bedrock_runtime>=0.1.0,<0.2.0
66
langchain_mcp_adapters

0 commit comments

Comments
 (0)