Skip to content

Commit 26ffddc

Browse files
committed
rename clickstack folder
1 parent efe8c12 commit 26ffddc

File tree

19 files changed

+46
-1770
lines changed

19 files changed

+46
-1770
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
**.idea
22
**.venv
33
.DS_Store
4+
node_modules

ClickStack/librechat-llm-observability/Dockerfile.mcp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ RUN python3 -m pip install --no-cache-dir --break-system-packages \
66
opentelemetry-exporter-otlp
77

88
RUN opentelemetry-bootstrap -a install
9+
910
RUN python3 -m pip uninstall -y pip_system_certs
1011

1112
RUN mkdir -p /app/logs

ClickStack/librechat-llm-observability/Dockerfile.otel

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ EXPOSE 3080
1616
# Replace CMD with OpenTelemetry-instrumented version
1717
# Redirect stdout and stderr to a file
1818
CMD sh -c "NODE_ENV=production \
19-
DEFAULT_HDX_NODE_ADVANCED_NETWORK_CAPTURE=true \
19+
HDX_NODE_ADVANCED_NETWORK_CAPTURE=true \
2020
OTEL_EXPORTER_OTLP_ENDPOINT=$OTEL_EXPORTER_OTLP_ENDPOINT \
21-
HYPERDX_API_KEY=$HYPERDX_API_KEY \
21+
HYPERDX_API_KEY=$CLICKSTACK_API_KEY \
2222
OTEL_SERVICE_NAME=librechat-api \
2323
npx opentelemetry-instrument api/server/index.js \
2424
>> /app/api/logs/console.log 2>&1"

ClickStack/librechat-llm-observability/README.md

Lines changed: 29 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,39 +2,53 @@
22

33
## Deploy ClickStart
44

5-
The easiest to get ClickStack up and running is to run it locally using docker. You can follow the [documentation](https://clickhouse.com/docs/use-cases/observability/clickstack/getting-started#deploy-stack-with-docker) here to get started.
5+
The easiest way to get ClickStack up and running is to run it locally using Docker. For more details, refer to the [documentation](https://clickhouse.com/docs/use-cases/observability/clickstack/getting-started#deploy-stack-with-docker).
66

7-
Once ClickStack is up and running, get the [Ingestion API Key](https://clickhouse.com/docs/use-cases/observability/clickstack/getting-started/sample-data#copy-ingestion-api-key) from the Team settings menu.
7+
```
8+
docker run -p 8080:8080 -p 4317:4317 -p 4318:4318 docker.hyperdx.io/hyperdx/hyperdx-all-in-one
9+
```
10+
11+
Once ClickStack is running, get the [Ingestion API Key](https://clickhouse.com/docs/use-cases/observability/clickstack/getting-started/sample-data#copy-ingestion-api-key) from the Team settings menu.
812

913
## Configure librechat
1014

11-
Librechat requires an access to LLM to work. This demo has been tested only with Anthropic models, but other LLM provider should provide similar experience.
15+
LibreChat requires access to an LLM to function. This demo has been tested only with Anthropic models but other LLM providers should work similarly.
1216

13-
Rename the file env.example to .env and edit to put your LLM Api key. See librechat [documentation](https://www.librechat.ai/docs/configuration/dotenv#anthropic) for more information.
17+
Rename the file `.env.example` to `.env` and provide your LLM API key.
1418

15-
On top the `.env` file, copy the Ingestion API Key from ClickStack under the value `HYPERDX_API_KEY`.
19+
By example for Anthropic, scroll down to find the key `ANTHROPIC_API_KEY` and provide your API Key.
1620

17-
## Configure ClickHouse MCP Server
21+
See the LibreChat [documentation](https://www.librechat.ai/docs/configuration/dotenv#anthropic) for more information.
1822

19-
[ClickHouse MCP Server](https://github.com/ClickHouse/mcp-clickhouse) allows LLM to query ClickHouse.
23+
In addition to the LLM key, copy the Ingestion API Key from ClickStack and assign it to the variable `CLICKSTACK_API_KEY` in the .env file.
2024

21-
You need to configure ClickHouse MCP Server to connect to your ClickHouse deployment.
25+
## Configure ClickHouse MCP Server
2226

23-
Edit the following environment variables in the file `.env`:
27+
[ClickHouse MCP Server](https://github.com/ClickHouse/mcp-clickhouse) allows LLMs to query ClickHouse.
2428

25-
- `CLICKHOUSE_HOST`: ClickHouse deployment URL
26-
- `CLICKHOUSE_USER`: Clickhouse username
27-
- `CLICKHOUSE_PASSWORD`: Clickhouse password
29+
You need to configure ClickHouse MCP Server to connect to your ClickHouse deployment.
2830

29-
By default, the environement is configured to connect to the public [ClickHouse SQL Playground](https://sql.clickhouse.com/).
31+
By default, the MCP server is configured to connect to the public [ClickHouse SQL Playground](https://sql.clickhouse.com/).
32+
33+
To connect to your own ClickHouse deployment, edit the following environment variables in the `.env` file:
34+
- `CLICKHOUSE_HOST`: ClickHouse deployment URL
35+
- `CLICKHOUSE_USER`: ClickHouse username
36+
- `CLICKHOUSE_PASSWORD`: ClickHouse password
3037

3138
## Start librechat locally.
3239

33-
Run `docker compose up` to start librechat.
40+
Run `docker compose up` to start LibreChat.
41+
42+
You can access it at `http://localhost:3080` and sign up to get started.
3443

35-
You can access it at `http://localhost:3080`.
44+
On the main page, you need to select the configured LLM and the ClickHouse MCP Server before typing your question.
3645

46+
![](./img/librechat.png)
3747

48+
Here are examples of prompts to get you started if the MCP server is connected to the default SQL Playground.
49+
- What are the datasets available?
50+
- How does the USD relate to GBP?
51+
- Who is the most frequent contributor to Clickhouse git repo using the available git stat data?
3852

3953

4054

ClickStack/librechat-llm-observability/docker-compose.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ services:
2424
- RAG_API_URL=http://rag_api:${RAG_PORT:-8000}
2525
- OTEL_EXPORTER_OTLP_ENDPOINT=http://host.docker.internal:4318
2626
- OTEL_SERVICE_NAME=librechat-api
27-
- HYPERDX_API_KEY=${HYPERDX_API_KEY}
27+
- CLICKSTACK_API_KEY=${CLICKSTACK_API_KEY}
2828
- CONSOLE_JSON=true
2929
- DEBUG_CONSOLE=true
3030
volumes:
@@ -120,7 +120,7 @@ services:
120120
volumes:
121121
- ./logs/mcp-clickhouse:/app/logs
122122
environment:
123-
- HYPERDX_API_KEY=${HYPERDX_API_KEY}
123+
- CLICKSTACK_API_KEY=${CLICKSTACK_API_KEY}
124124
- OTEL_EXPORTER_OTLP_ENDPOINT=http://host.docker.internal:4317
125125
- OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://host.docker.internal:4317
126126
- OTEL_SERVICE_NAME=mcp-clickhouse

0 commit comments

Comments
 (0)