Skip to content

Commit

Permalink
refactor: change event name to llmStream
Browse files Browse the repository at this point in the history
  • Loading branch information
snowyu committed Jul 28, 2024
1 parent 0f68269 commit 321e009
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/run-script.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export async function runScript(filename: string, options: IRunScriptOptions) {

let script
try {
script = AIScriptEx.load(filename, {chatsDir: options.chatsDir})
script = AIScriptEx.loadFile(filename, {chatsDir: options.chatsDir})
} catch(err) {
console.error('Load script error:',err)
process.exit(1)
Expand Down Expand Up @@ -142,7 +142,7 @@ export async function runScript(filename: string, options: IRunScriptOptions) {
let retryCount = 0

if (stream) {
runtime.on('llm-stream', async function(llmResult, content: string, count: number) {
runtime.on('llmStream', async function(llmResult, content: string, count: number) {
const runtime = this.target as AIScriptEx
let s = llmResult.content

Expand Down

0 comments on commit 321e009

Please sign in to comment.