https://github.com/swuecho/chat_effect
https://github.com/swuecho/chat_effect
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/swuecho/chat_effect
- Owner: swuecho
- Created: 2024-07-10T01:45:28.000Z (10 months ago)
- Default Branch: master
- Last Pushed: 2024-07-12T01:31:24.000Z (10 months ago)
- Last Synced: 2024-11-22T01:12:35.689Z (5 months ago)
- Language: TypeScript
- Size: 59.6 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# chat_effect
Basic LLM workflow with tracing and visualization. The converstation to LLM is add to `chat` database.
the workflow is written using TS(with Effect). The UI is from Grafana with Tempo(tracing) and Chat (converation display)



Chat https://github.com/swuecho/chat is the app I develop for converation with LLM. Here it is used as a frontend to display the converstaion. (the converstaion is logged into the database of a local chat app instance)
Tracing server is set up using the docker.zip in https://effect.website/docs/guides/observability/telemetry/tracing
```js
const NodeSdkLive = NodeSdk.layer(() => ({
resource: { serviceName: "AI agent with version:" + commitHash },
spanProcessor: new BatchSpanProcessor(new OTLPTraceExporter(
{ url: "http://tracing_server_host:4318/v1/traces" }
))
}))
```
## dev```sh
npx pgtyped -w -c pgtyped.config.json
```To install dependencies:
```bash
npm install
```To run:
```bash
npx tsx src/index.ts
```