wingbot 3.76.4 → 3.76.6
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 +1 -1
- package/src/LLMRouter.js +15 -4
- package/src/graphApi/schema.gql +3 -1
package/package.json
CHANGED
package/src/LLMRouter.js
CHANGED
|
@@ -185,10 +185,21 @@ class LLMRouter {
|
|
|
185
185
|
.setData(routing)
|
|
186
186
|
.systemPrompt(prompt);
|
|
187
187
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
188
|
+
// Load recent conversation history so the router classifies the last
|
|
189
|
+
// user message in context (e.g. an answer to a bot question) rather
|
|
190
|
+
// than in isolation, where a bare "the protocol is wrong" reads as an
|
|
191
|
+
// intent to reject. Length/flag come from the 'routing' preset;
|
|
192
|
+
// getTranscript already includes this turn's user message as the
|
|
193
|
+
// final entry, so it is not appended separately.
|
|
194
|
+
const { transcriptLength, transcriptFlag } = llm.llmOptions('routing');
|
|
195
|
+
const transcript = await llm.res.getTranscript(
|
|
196
|
+
Math.abs(transcriptLength),
|
|
197
|
+
transcriptFlag
|
|
198
|
+
);
|
|
199
|
+
transcript.forEach((turn) => {
|
|
200
|
+
if (turn.fromBot) session.assistant(turn.text);
|
|
201
|
+
else session.user(turn.text);
|
|
202
|
+
});
|
|
192
203
|
|
|
193
204
|
let res;
|
|
194
205
|
try {
|
package/src/graphApi/schema.gql
CHANGED
|
@@ -131,10 +131,12 @@ type ToolFunction {
|
|
|
131
131
|
|
|
132
132
|
type PromptInfo {
|
|
133
133
|
prompt: [LLMMessage!]!
|
|
134
|
-
result: LLMMessage
|
|
134
|
+
result: LLMMessage
|
|
135
135
|
vectorSearchResult: VectorSearchResult
|
|
136
136
|
tools: [ToolFunction!]
|
|
137
137
|
durationMs: Float
|
|
138
|
+
options: Any
|
|
139
|
+
error: String
|
|
138
140
|
}
|
|
139
141
|
|
|
140
142
|
type UserInteraction {
|