Skip to content
This repository was archived by the owner on Apr 30, 2026. It is now read-only.

feat: add llm-stream event#707

Merged
himself65 merged 3 commits into
run-llama:mainfrom
himself65:himself65/20240410/llm-stream
Apr 10, 2024
Merged

feat: add llm-stream event#707
himself65 merged 3 commits into
run-llama:mainfrom
himself65:himself65/20240410/llm-stream

Conversation

@himself65

@himself65 himself65 commented Apr 10, 2024

Copy link
Copy Markdown
Contributor

Related: #664

@changeset-bot

changeset-bot Bot commented Apr 10, 2024

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 77d1369

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel

vercel Bot commented Apr 10, 2024

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
llama-index-ts-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 10, 2024 2:32pm

Comment on lines +109 to +115
getCallbackManager().dispatchEvent("llm-stream", {
payload: {
id,
chunk,
},
});
finalResponse.raw.push(chunk);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

call before the yield could be more sense

Comment on lines +80 to +86
.replace(/"id": ".*"/g, `"id": "HIDDEN"`)
.replace(/"created": \d+/g, `"created": 114514`)
.replace(
/"system_fingerprint": ".*"/g,
'"system_fingerprint": "HIDDEN"',
)
.replace(/"tool_call_id": ".*"/g, '"tool_call_id": "HIDDEN"');

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those value shouldn't be used

@himself65
himself65 merged commit af5df1d into run-llama:main Apr 10, 2024
@himself65
himself65 deleted the himself65/20240410/llm-stream branch April 10, 2024 14:26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant