chore: rename autoFixer for better understanding
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
import chalk from 'chalk'
|
import chalk from 'chalk'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Normalize LLM response to fix common format issues.
|
* Normalize LLM response and fix common format issues.
|
||||||
*
|
*
|
||||||
* Handles:
|
* Handles:
|
||||||
* - No tool_calls but JSON in message.content (fallback)
|
* - No tool_calls but JSON in message.content (fallback)
|
||||||
@@ -65,7 +65,7 @@ export function normalizeResponse(response: any): any {
|
|||||||
resolvedArguments = { action: safeJsonParse(resolvedArguments) }
|
resolvedArguments = { action: safeJsonParse(resolvedArguments) }
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
throw new Error('No tool_call and message content does not contain valid JSON')
|
throw new Error('No tool_call and the message content does not contain valid JSON')
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
throw new Error('No tool_call nor message content is present')
|
throw new Error('No tool_call nor message content is present')
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
export { normalizeResponse } from './normalize'
|
export { normalizeResponse } from './autoFixer'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Wait until condition becomes true
|
* Wait until condition becomes true
|
||||||
|
|||||||
Reference in New Issue
Block a user