unified-ai-router 2.3.2 → 2.3.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "unified-ai-router",
3
- "version": "2.3.2",
3
+ "version": "2.3.4",
4
4
  "description": "A unified interface for multiple LLM providers with automatic fallback, featuring an OpenAI-compatible server, tool support, and a deployable Telegram bot.",
5
5
  "license": "ISC",
6
6
  "author": "mlibre",
package/readme.md CHANGED
@@ -208,6 +208,8 @@ After deploying the bot, you need to configure the Telegram Mini App and menu bu
208
208
 
209
209
  Once configured, users can access the Mini App by sending `/start` or `/app` to your bot, or through the menu button.
210
210
 
211
+ An example of a deployed bot is accessible on Telegram: [https://t.me/freePulseAIbot](https://t.me/freePulseAIbot)
212
+
211
213
  ## 📁 Project Structure
212
214
 
213
215
  * `main.js` - The core AIRouter library.
@@ -52,7 +52,7 @@ module.exports = async ( req, res ) =>
52
52
  // Use your existing AI Router with the full message history
53
53
  const aiResponse = await telegramClient.aiRouter.chatCompletion( messages );
54
54
 
55
- return res.status( 200 ).json({ response: aiResponse });
55
+ return res.status( 200 ).json({ response: aiResponse.content });
56
56
 
57
57
  }
58
58
  catch ( error )
@@ -11,17 +11,6 @@
11
11
 
12
12
  <body>
13
13
  <div class="app-shell">
14
- <header class="app-header">
15
- <div class="brand">
16
- <div class="brand-title">AI Router</div>
17
- <div class="brand-sub">Beautiful · Fast · Private</div>
18
- </div>
19
-
20
- <div class="header-actions">
21
- <!-- removed explicit Search toggle per request -->
22
- <button id="fullscreen-btn" class="icon-btn" aria-label="Toggle fullscreen">⤢</button>
23
- </div>
24
- </header>
25
14
 
26
15
  <main class="chat-area">
27
16
  <div id="messages" class="messages" role="log" aria-live="polite"></div>
@@ -39,7 +28,7 @@
39
28
  <input id="include-search" type="checkbox" />
40
29
  <span class="small">Include search</span>
41
30
  </label>
42
- <button id="send" type="submit" class="send-btn">Send</button>
31
+ <button id="send" type="submit" class="send-btn">→</button>
43
32
  </form>
44
33
 
45
34
  </div>
@@ -136,27 +136,34 @@ body {
136
136
  display: flex;
137
137
  gap: 8px;
138
138
  padding: 10px;
139
- /* removed top border as requested */
140
- border-top: none;
139
+ background: var(--tg-theme-secondary-bg-color);
140
+ border-top: 1px solid var(--tg-theme-section-separator-color);
141
141
  align-items: center
142
142
  }
143
143
 
144
144
  .composer input[type="text"] {
145
145
  flex: 1;
146
146
  padding: 10px 12px;
147
- border-radius: 999px;
148
- /* removed white border */
149
- border: none;
147
+ border-radius: 18px;
148
+ border: 1px solid var(--tg-theme-section-separator-color);
149
+ background: var(--tg-theme-section-bg-color);
150
+ color: var(--text);
150
151
  outline: none;
151
152
  }
152
153
 
153
154
  .send-btn {
154
155
  background: var(--accent);
155
156
  color: #fff;
156
- padding: 9px 14px;
157
- border-radius: 999px;
157
+ padding: 0;
158
+ border-radius: 50%;
158
159
  border: none;
159
- cursor: pointer
160
+ cursor: pointer;
161
+ min-width: 44px;
162
+ height: 44px;
163
+ display: flex;
164
+ align-items: center;
165
+ justify-content: center;
166
+ font-size: 18px
160
167
  }
161
168
 
162
169
  .search-panel {