ltcai 2.2.1 → 2.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +183 -140
- package/codex_telegram_bot.py +6 -2
- package/docs/CHANGELOG.md +100 -23
- package/docs/EDITION_STRATEGY.md +8 -8
- package/docs/ENTERPRISE.md +5 -5
- package/docs/PLUGIN_SDK.md +4 -4
- package/docs/V2_ARCHITECTURE.md +9 -9
- package/docs/architecture.md +18 -17
- package/docs/images/admin-dashboard.png +0 -0
- package/docs/images/knowledge-graph.png +0 -0
- package/docs/images/lattice-ai-demo.gif +0 -0
- package/docs/images/lattice-ai-hero.png +0 -0
- package/docs/images/mobile-responsive.png +0 -0
- package/docs/images/pipeline.png +0 -0
- package/docs/images/workspace-dark.png +0 -0
- package/docs/images/workspace-light.png +0 -0
- package/latticeai/__init__.py +1 -1
- package/latticeai/api/static_routes.py +10 -0
- package/latticeai/core/logging_safety.py +62 -0
- package/latticeai/core/workspace_os.py +1 -1
- package/package.json +10 -5
- package/static/account.html +9 -4
- package/static/activity.html +4 -4
- package/static/admin.html +8 -3
- package/static/agents.html +4 -4
- package/static/chat.html +15 -10
- package/static/css/reference/account.css +303 -0
- package/static/css/reference/admin.css +610 -0
- package/static/css/reference/base.css +1658 -0
- package/static/{lattice-reference.css → css/reference/chat.css} +243 -3599
- package/static/css/reference/graph.css +1016 -0
- package/static/css/responsive.css +226 -4
- package/static/css/tokens.css +16 -5
- package/static/favicon.ico +0 -0
- package/static/graph.html +9 -4
- package/static/platform.css +1 -1
- package/static/plugins.html +4 -4
- package/static/scripts/chat.js +187 -69
- package/static/scripts/ux.js +1 -1
- package/static/sw.js +5 -3
- package/static/workflows.html +4 -4
- package/static/workspace.css +75 -14
- package/static/workspace.html +5 -5
- package/telegram_bot.py +18 -14
package/README.md
CHANGED
|
@@ -3,122 +3,59 @@
|
|
|
3
3
|
|
|
4
4
|
# Lattice AI
|
|
5
5
|
|
|
6
|
-
**
|
|
7
|
-
on top of a durable Knowledge Graph.
|
|
6
|
+
**Local-first AI workspace for knowledge graphs, AI pipelines, and multi-agent coding workflows.**
|
|
8
7
|
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
Plan, execute, review, and remember work across local models, cloud models,
|
|
9
|
+
files, and team workflows.
|
|
11
10
|
</div>
|
|
12
11
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
Lattice AI turns your files, documents, images, screenshots, conversations,
|
|
16
|
-
decisions, notes, and work history into linked knowledge. AI then works on top of
|
|
17
|
-
that Knowledge Graph to advise, analyze, generate documents, and automate work.
|
|
18
|
-
|
|
19
|
-
It is built around a simple product rule:
|
|
20
|
-
|
|
21
|
-
> Do not control the user in the name of protection. Explain clearly, disclose
|
|
22
|
-
> sources and risks, then let the user decide.
|
|
23
|
-
|
|
24
|
-
## What Lattice AI is
|
|
25
|
-
|
|
26
|
-
Lattice AI is four things working together, not an operating system and not a
|
|
27
|
-
simple chat front-end:
|
|
28
|
-
|
|
29
|
-
- **Local-first AI Workspace** — runs on your machine first; your data and graph
|
|
30
|
-
stay local by default.
|
|
31
|
-
- **AI Pipeline Platform** — a Plan → Execute → Review loop that can route across
|
|
32
|
-
multiple LLMs for each stage.
|
|
33
|
-
- **Knowledge Graph Platform** — multimodal inputs become entities,
|
|
34
|
-
relationships, evidence, and artifacts that outlive any single model.
|
|
35
|
-
- **Workspace Platform** — Personal and Organization workspaces, role-based
|
|
36
|
-
access, and SSO for teams.
|
|
37
|
-
|
|
38
|
-
## Highlights
|
|
39
|
-
|
|
40
|
-
- **Multimodal ingestion** — accepts PDFs, Word, spreadsheets, slide decks,
|
|
41
|
-
images, screenshots, notes, code, web content, conversations, and work logs
|
|
42
|
-
without asking you to pre-convert them.
|
|
43
|
-
- **Knowledge Graph core** — extracts entities, relationships, evidence,
|
|
44
|
-
decisions, and artifacts so your work memory survives model changes.
|
|
45
|
-
- **Multi-agent workflow** — agents hand off work with structured context
|
|
46
|
-
packets, review/retry loops, and replayable timelines.
|
|
47
|
-
- **Local model management** — MLX-VLM on Apple Silicon, with current-generation
|
|
48
|
-
multimodal model recommendations based on your CPU, GPU, RAM, storage, and OS.
|
|
49
|
-
- **Source disclosure** — every recommended model shows its facts in plain
|
|
50
|
-
language before use: maker country, maker company, run mode (local/cloud),
|
|
51
|
-
internet requirement, and model name.
|
|
52
|
-
- **Basic / Advanced / Admin modes** — the same features everywhere; the modes
|
|
53
|
-
differ only in how much is explained. Admin mode adds authority
|
|
54
|
-
(user management, permissions, audit logs, org/security policy, model approval).
|
|
55
|
-
|
|
56
|
-
## v2.2.1 — Frontend & UX overhaul
|
|
57
|
-
|
|
58
|
-
v2.2.1 is a UX-focused release. No features were removed; the interface was
|
|
59
|
-
re-laid out and re-themed.
|
|
60
|
-
|
|
61
|
-
- **Responsive, mobile-first UI** — phone, tablet, laptop, desktop, ultrawide,
|
|
62
|
-
and 4K. Content is re-laid out for each size, never hidden.
|
|
63
|
-
- **Light / Dark themes via design tokens** — a single source of truth in
|
|
64
|
-
[`static/css/tokens.css`](static/css/tokens.css). `:root` holds light values,
|
|
65
|
-
`[data-lt-theme="dark"]` holds dark values. The theme toggle, OS preference
|
|
66
|
-
detection, and persistence live in
|
|
67
|
-
[`static/scripts/ux.js`](static/scripts/ux.js).
|
|
68
|
-
- **Accessibility** — 44px touch targets, `:focus-visible` rings, a
|
|
69
|
-
keyboard-safe chat composer (uses `visualViewport` insets), iOS no-zoom inputs,
|
|
70
|
-
and reduced-motion support.
|
|
71
|
-
- **Knowledge Graph UX** — responsive canvas that re-fits on resize, zoom
|
|
72
|
-
buttons, fullscreen, minimap, relationship filtering, a mobile graph↔card
|
|
73
|
-
view, and a theme-aware palette.
|
|
74
|
-
- **Admin UX** — wide tables reflow to cards on mobile, with larger touch targets
|
|
75
|
-
and full dark/light support.
|
|
76
|
-
- **File UX** — drag & drop and screenshot paste to attach. Model cards explain
|
|
77
|
-
country, company, run mode, and internet use in plain language.
|
|
78
|
-
|
|
79
|
-
## Knowledge Graph flow
|
|
12
|
+
<div align="center">
|
|
80
13
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
```
|
|
14
|
+
[](https://pypi.org/project/ltcai/)
|
|
15
|
+
[](https://www.npmjs.com/package/ltcai)
|
|
16
|
+
[](https://marketplace.visualstudio.com/items?itemName=parktaesoo.ltcai)
|
|
17
|
+
[](https://open-vsx.org/extension/parktaesoo/ltcai)
|
|
18
|
+
[](https://github.com/TaeSooPark-PTS/LatticeAI/releases/tag/v2.2.7)
|
|
19
|
+
[](LICENSE)
|
|
20
|
+
[](https://www.python.org/)
|
|
21
|
+
[](https://marketplace.visualstudio.com/items?itemName=parktaesoo.ltcai)
|
|
90
22
|
|
|
91
|
-
|
|
23
|
+
</div>
|
|
92
24
|
|
|
93
|
-
|
|
25
|
+

|
|
94
26
|
|
|
95
|
-
|
|
96
|
-
keeps text-only recommendation paths out of the product:
|
|
27
|
+
## Install
|
|
97
28
|
|
|
98
|
-
|
|
99
|
-
| --- | --- | --- |
|
|
100
|
-
| Gemma 4 | Default Google multimodal family | `mlx-community/gemma-4-12b-it-4bit` |
|
|
101
|
-
| Gemma 4 large | Higher-quality local multimodal work | `mlx-community/gemma-4-31b-it-4bit` |
|
|
102
|
-
| Qwen3-VL | Smaller, balanced multimodal options | `mlx-community/Qwen3-VL-4B-Instruct-4bit` |
|
|
103
|
-
| Llama 4 | Meta multimodal option | `mlx-community/Llama-4-Scout-17B-16E-Instruct-4bit` |
|
|
29
|
+
Install the local workspace:
|
|
104
30
|
|
|
105
|
-
|
|
106
|
-
|
|
31
|
+
```bash
|
|
32
|
+
pip install ltcai
|
|
33
|
+
```
|
|
107
34
|
|
|
108
|
-
|
|
35
|
+
Add Apple Silicon local model support:
|
|
109
36
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
without it)
|
|
37
|
+
```bash
|
|
38
|
+
pip install "ltcai[local]"
|
|
39
|
+
```
|
|
114
40
|
|
|
115
|
-
|
|
41
|
+
Install the npm CLI:
|
|
116
42
|
|
|
117
|
-
|
|
43
|
+
```bash
|
|
44
|
+
npm install -g ltcai
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Install the coding extension:
|
|
48
|
+
|
|
49
|
+
- [VS Code Marketplace: parktaesoo.ltcai](https://marketplace.visualstudio.com/items?itemName=parktaesoo.ltcai)
|
|
50
|
+
- [Open VSX: parktaesoo.ltcai](https://open-vsx.org/extension/parktaesoo/ltcai)
|
|
51
|
+
- [GitHub Release v2.2.7](https://github.com/TaeSooPark-PTS/LatticeAI/releases/tag/v2.2.7)
|
|
52
|
+
|
|
53
|
+
## Quick Start
|
|
54
|
+
|
|
55
|
+
Start the workspace:
|
|
118
56
|
|
|
119
57
|
```bash
|
|
120
|
-
|
|
121
|
-
npm run dev # runs: python3 ltcai_cli.py --reload
|
|
58
|
+
LTCAI
|
|
122
59
|
```
|
|
123
60
|
|
|
124
61
|
Then open:
|
|
@@ -127,76 +64,182 @@ Then open:
|
|
|
127
64
|
http://127.0.0.1:4825
|
|
128
65
|
```
|
|
129
66
|
|
|
130
|
-
|
|
67
|
+
Development checkout:
|
|
131
68
|
|
|
132
69
|
```bash
|
|
133
|
-
|
|
134
|
-
|
|
70
|
+
npm install
|
|
71
|
+
npm run dev
|
|
135
72
|
```
|
|
136
73
|
|
|
137
|
-
|
|
74
|
+
Useful validation commands:
|
|
138
75
|
|
|
139
76
|
```bash
|
|
140
|
-
|
|
77
|
+
npm run check:python
|
|
78
|
+
npm run test:unit
|
|
79
|
+
npm run build
|
|
141
80
|
```
|
|
142
81
|
|
|
143
|
-
|
|
82
|
+
## What Is Lattice AI?
|
|
144
83
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
npm run check:python # py_compile across core modules
|
|
148
|
-
npm run build # python3 -m build
|
|
149
|
-
```
|
|
84
|
+
Lattice AI is a local-first AI workspace for people and teams who want their
|
|
85
|
+
files, models, graph context, and agent workflows in one place.
|
|
150
86
|
|
|
151
|
-
|
|
87
|
+
- **Local-first AI Workspace**: work starts on your machine, with local data and
|
|
88
|
+
workspace state by default.
|
|
89
|
+
- **AI Pipeline Platform**: plan, execute, review, retry, and replay work across
|
|
90
|
+
local models, cloud models, tools, files, and generated artifacts.
|
|
91
|
+
- **Knowledge Graph Platform**: documents, images, screenshots, notes,
|
|
92
|
+
conversations, and decisions become linked entities, relationships, evidence,
|
|
93
|
+
and reusable context.
|
|
94
|
+
- **Multi-Agent Workflow Platform**: agents hand off structured context, review
|
|
95
|
+
work, retry with reasons, and keep timelines inspectable.
|
|
96
|
+
- **Personal / Organization Workspace**: move between personal work and team
|
|
97
|
+
workspaces with role-aware views.
|
|
98
|
+
- **Local Model Management**: choose current multimodal local models with source
|
|
99
|
+
disclosure, hardware-aware recommendations, and cloud fallback options.
|
|
100
|
+
- **SSO for teams**: organization workspaces can be paired with Okta or
|
|
101
|
+
Microsoft Entra ID patterns for team access.
|
|
152
102
|
|
|
153
|
-
|
|
103
|
+
## Why Lattice AI?
|
|
154
104
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
105
|
+
Most AI tools split your work across a chat window, a model picker, loose files,
|
|
106
|
+
and disconnected automations. Lattice AI keeps those parts together:
|
|
107
|
+
|
|
108
|
+
- files and conversations become graph context;
|
|
109
|
+
- graph context feeds pipelines and coding actions;
|
|
110
|
+
- model cards disclose country, company, run mode, internet usage, and model
|
|
111
|
+
identity;
|
|
112
|
+
- personal and organization workspaces keep team workflows separate from local
|
|
113
|
+
work;
|
|
114
|
+
- multi-agent workflows leave behind replayable plans, reviews, retries, and
|
|
115
|
+
outcomes.
|
|
116
|
+
|
|
117
|
+
## v2.2.7 Visual Stabilization Highlights
|
|
118
|
+
|
|
119
|
+
Lattice AI v2.2.7 is a visual stabilization release driven by rendered browser
|
|
120
|
+
screens, not stylesheet cleanup alone. It keeps the existing design-token
|
|
121
|
+
structure while making the app feel like one cohesive product.
|
|
122
|
+
|
|
123
|
+
- The dark chat composer is now an intentional dark surface with a crisp outer
|
|
124
|
+
focus state, no white haze, and no legacy inner textarea box.
|
|
125
|
+
- Knowledge Graph canvas and Workspace OS panels no longer fall back to
|
|
126
|
+
washed-out light surfaces in dark mode.
|
|
127
|
+
- Workspace select, onboarding, recommendation, auto setup, mode select,
|
|
128
|
+
pipeline, My Computer, profile, settings, VPC, and model-state surfaces use a
|
|
129
|
+
shared modal/panel language.
|
|
130
|
+
- Static frontend asset cache-busting is normalized to `?v=2.2.7`, including
|
|
131
|
+
`/static/scripts/chat.js?v=2.2.7`.
|
|
132
|
+
- Playwright visual coverage now locks the v2.2.7 composer, graph canvas,
|
|
133
|
+
Workspace OS dark inputs/cards, and mobile composer behavior.
|
|
134
|
+
|
|
135
|
+
Carried forward from v2.2.x: mobile-first responsive layout, design-token
|
|
136
|
+
light/dark themes, keyboard-safe chat composer, Knowledge Graph responsive UX,
|
|
137
|
+
Admin mobile card layout, drag-and-drop file attachment, and model-card source
|
|
138
|
+
disclosure.
|
|
139
|
+
|
|
140
|
+
## Screenshots
|
|
141
|
+
|
|
142
|
+
### Workspace
|
|
143
|
+
|
|
144
|
+

|
|
145
|
+
|
|
146
|
+

|
|
147
|
+
|
|
148
|
+
### Knowledge Graph
|
|
149
|
+
|
|
150
|
+

|
|
151
|
+
|
|
152
|
+
### AI Pipeline
|
|
153
|
+
|
|
154
|
+

|
|
155
|
+
|
|
156
|
+
### Admin Dashboard
|
|
157
|
+
|
|
158
|
+

|
|
159
|
+
|
|
160
|
+
### Mobile Responsive
|
|
161
|
+
|
|
162
|
+

|
|
163
|
+
|
|
164
|
+
## Knowledge Graph Flow
|
|
165
|
+
|
|
166
|
+
```text
|
|
167
|
+
files / documents / images / screenshots / conversations / decisions
|
|
168
|
+
-> multimodal understanding
|
|
169
|
+
-> entity and relationship extraction
|
|
170
|
+
-> evidence and artifact storage
|
|
171
|
+
-> Knowledge Graph update
|
|
172
|
+
-> AI pipeline context
|
|
173
|
+
-> coding actions / analysis / documents / team workflows
|
|
160
174
|
```
|
|
161
175
|
|
|
162
|
-
|
|
176
|
+
The graph keeps useful workspace context available even when you change models.
|
|
163
177
|
|
|
164
|
-
|
|
165
|
-
VS Code extension.
|
|
178
|
+
## Local Model Policy
|
|
166
179
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
180
|
+
Lattice AI recommends current-generation multimodal models for local use and
|
|
181
|
+
keeps local model choices explicit.
|
|
182
|
+
|
|
183
|
+
| Family | Default role | Example recommendation |
|
|
184
|
+
| --- | --- | --- |
|
|
185
|
+
| Gemma 4 | Default Google multimodal family | `mlx-community/gemma-4-12b-it-4bit` |
|
|
186
|
+
| Gemma 4 large | Higher-quality local multimodal work | `mlx-community/gemma-4-31b-it-4bit` |
|
|
187
|
+
| Qwen3-VL | Smaller, balanced multimodal options | `mlx-community/Qwen3-VL-4B-Instruct-4bit` |
|
|
188
|
+
| Llama 4 | Meta multimodal option | `mlx-community/Llama-4-Scout-17B-16E-Instruct-4bit` |
|
|
189
|
+
|
|
190
|
+
Every recommended model card shows maker country, maker company, run mode,
|
|
191
|
+
internet requirement, and model name. See [MODEL_POLICY.md](MODEL_POLICY.md).
|
|
192
|
+
|
|
193
|
+
## Architecture
|
|
194
|
+
|
|
195
|
+
```text
|
|
196
|
+
Personal / Organization Workspace
|
|
197
|
+
-> files, chats, screenshots, model choices, workflow events
|
|
198
|
+
-> Knowledge Graph
|
|
199
|
+
-> AI Pipeline
|
|
200
|
+
-> Multi-Agent Workflow
|
|
201
|
+
-> coding actions, documents, analysis, team handoffs
|
|
170
202
|
```
|
|
171
203
|
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
204
|
+
Core areas:
|
|
205
|
+
|
|
206
|
+
- FastAPI local workspace app
|
|
207
|
+
- Knowledge Graph storage and graph APIs
|
|
208
|
+
- AI pipeline and workflow designer
|
|
209
|
+
- Multi-agent handoff, review, retry, and replay records
|
|
210
|
+
- Local model management and model recommendation catalog
|
|
211
|
+
- VS Code / Cursor / VSCodium extension surface
|
|
212
|
+
- Personal and organization workspace boundaries
|
|
175
213
|
|
|
176
214
|
## Documentation
|
|
177
215
|
|
|
178
|
-
- [ARCHITECTURE.md](ARCHITECTURE.md) —
|
|
216
|
+
- [ARCHITECTURE.md](ARCHITECTURE.md) — workspace, graph, pipeline, and model-management overview
|
|
179
217
|
- [docs/architecture.md](docs/architecture.md) — full architecture reference
|
|
180
218
|
- [PROJECT_PRINCIPLES.md](PROJECT_PRINCIPLES.md) — product principles
|
|
181
|
-
- [AI_PHILOSOPHY.md](AI_PHILOSOPHY.md) — how AI is used
|
|
219
|
+
- [AI_PHILOSOPHY.md](AI_PHILOSOPHY.md) — how AI is used in the workspace
|
|
182
220
|
- [MODEL_POLICY.md](MODEL_POLICY.md) — local model recommendation policy
|
|
183
221
|
- [KNOWLEDGE_GRAPH.md](KNOWLEDGE_GRAPH.md) — graph model and behavior
|
|
184
|
-
- [docs/MULTI_AGENT_RUNTIME.md](docs/MULTI_AGENT_RUNTIME.md) — multi-agent runtime
|
|
185
|
-
- [docs/WORKFLOW_DESIGNER.md](docs/WORKFLOW_DESIGNER.md) —
|
|
186
|
-
- [docs/REALTIME_COLLABORATION.md](docs/REALTIME_COLLABORATION.md) — realtime
|
|
187
|
-
- [docs/ENTERPRISE.md](docs/ENTERPRISE.md) —
|
|
188
|
-
- [docs/security-model.md](docs/security-model.md) — security model
|
|
222
|
+
- [docs/MULTI_AGENT_RUNTIME.md](docs/MULTI_AGENT_RUNTIME.md) — multi-agent workflow runtime
|
|
223
|
+
- [docs/WORKFLOW_DESIGNER.md](docs/WORKFLOW_DESIGNER.md) — AI pipeline designer
|
|
224
|
+
- [docs/REALTIME_COLLABORATION.md](docs/REALTIME_COLLABORATION.md) — realtime workspace events
|
|
225
|
+
- [docs/ENTERPRISE.md](docs/ENTERPRISE.md) — organization workspaces and SSO
|
|
189
226
|
- [docs/PLUGIN_SDK.md](docs/PLUGIN_SDK.md) — plugin SDK
|
|
190
|
-
- [RELEASE_NOTES.md](RELEASE_NOTES.md)
|
|
227
|
+
- [RELEASE_NOTES.md](RELEASE_NOTES.md) and [docs/CHANGELOG.md](docs/CHANGELOG.md)
|
|
191
228
|
|
|
192
229
|
## Release history
|
|
193
230
|
|
|
194
231
|
| Version | Theme |
|
|
195
232
|
| --- | --- |
|
|
196
|
-
| **2.2.
|
|
197
|
-
| 2.2.
|
|
198
|
-
| 2.
|
|
199
|
-
| 2.
|
|
233
|
+
| **2.2.7** | Visual system stabilization — cohesive dark/light screens, crisp chat composer, dark graph canvas, Workspace OS polish |
|
|
234
|
+
| 2.2.6 | Token-native CSS foundation |
|
|
235
|
+
| 2.2.5 | Release hygiene hotfix — dark overlays, modal stack, cache-busting, favicon, and Telegram log masking |
|
|
236
|
+
| 2.2.4 | Chat dark-mode completion |
|
|
237
|
+
| 2.2.3 | Frontend stability and UX fixes |
|
|
238
|
+
| 2.2.2 | Frontend QA stabilization — mobile nav, admin actions, overflow fixes, and expanded visual tests |
|
|
239
|
+
| 2.2.1 | Frontend and UX overhaul for responsive workspace, themes, graph UX, admin reflow, and file attachment |
|
|
240
|
+
| 2.2.0 | Multimodal-first Knowledge Graph and local model source disclosure |
|
|
241
|
+
| 2.1.0 | Multi-agent workflow maturity |
|
|
242
|
+
| 2.0.0 | AI pipeline, workflow, and plugin platform foundation |
|
|
200
243
|
| 1.7.0 | Graph and collaboration |
|
|
201
244
|
| 1.6.0 | Product experience deepening |
|
|
202
245
|
|
package/codex_telegram_bot.py
CHANGED
|
@@ -7,6 +7,10 @@ from pathlib import Path
|
|
|
7
7
|
import httpx
|
|
8
8
|
from openai import AsyncOpenAI
|
|
9
9
|
|
|
10
|
+
from latticeai.core.logging_safety import install_sensitive_log_filter, safe_log_text
|
|
11
|
+
|
|
12
|
+
install_sensitive_log_filter()
|
|
13
|
+
|
|
10
14
|
|
|
11
15
|
def load_env_file(path=".env"):
|
|
12
16
|
env_path = Path(path)
|
|
@@ -72,7 +76,7 @@ async def get_updates(client, offset=None):
|
|
|
72
76
|
res = await client.get(f"{TELEGRAM_API_URL}/getUpdates", params=params, timeout=35)
|
|
73
77
|
return res.json()
|
|
74
78
|
except Exception as exc:
|
|
75
|
-
logger.error("Telegram update failed: %s", exc)
|
|
79
|
+
logger.error("Telegram update failed: %s", safe_log_text(exc))
|
|
76
80
|
return None
|
|
77
81
|
|
|
78
82
|
|
|
@@ -161,7 +165,7 @@ async def handle_message(client, chat_id, text):
|
|
|
161
165
|
answer = await ask_codex(chat_id, text)
|
|
162
166
|
except Exception as exc:
|
|
163
167
|
logger.exception("OpenAI request failed")
|
|
164
|
-
answer = f"OpenAI 요청 실패: {exc}"
|
|
168
|
+
answer = f"OpenAI 요청 실패: {safe_log_text(exc)}"
|
|
165
169
|
await send_message(client, chat_id, answer)
|
|
166
170
|
|
|
167
171
|
|