mirror of
https://github.com/rowboatlabs/rowboat.git
synced 2026-04-28 01:46:23 +02:00
add more debug logs for llm-events
This commit is contained in:
parent
dee38a615f
commit
d7b423404c
1 changed files with 4 additions and 6 deletions
|
|
@ -827,10 +827,6 @@ export async function* streamAgent({
|
|||
tools,
|
||||
signal,
|
||||
)) {
|
||||
// Only log significant events (not text-delta to reduce noise)
|
||||
if (event.type !== 'text-delta') {
|
||||
loopLogger.log('got llm-stream-event:', event.type);
|
||||
}
|
||||
messageBuilder.ingest(event);
|
||||
yield* processEvent({
|
||||
runId,
|
||||
|
|
@ -924,9 +920,11 @@ async function* streamLlm(
|
|||
tools: ToolSet,
|
||||
signal?: AbortSignal,
|
||||
): AsyncGenerator<z.infer<typeof LlmStepStreamEvent>, void, unknown> {
|
||||
const converted = convertFromMessages(messages);
|
||||
console.log(`! SENDING payload to model: `, JSON.stringify(converted))
|
||||
const { fullStream } = streamText({
|
||||
model,
|
||||
messages: convertFromMessages(messages),
|
||||
messages: converted,
|
||||
system: instructions,
|
||||
tools,
|
||||
stopWhen: stepCountIs(1),
|
||||
|
|
@ -935,7 +933,7 @@ async function* streamLlm(
|
|||
for await (const event of fullStream) {
|
||||
// Check abort on every chunk for responsiveness
|
||||
signal?.throwIfAborted();
|
||||
// console.log("\n\n\t>>>>\t\tstream event", JSON.stringify(event));
|
||||
console.log("-> \t\tstream event", JSON.stringify(event));
|
||||
switch (event.type) {
|
||||
case "error":
|
||||
yield {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue