Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 fix: Artifacts Type Error, Tool Token Counts, and Agent Chat Import #5142

Merged
merged 3 commits into from
Dec 30, 2024

Conversation

danny-avila
Copy link
Owner

Summary

I fixed issues related to undefined file sizes in the FilePreview component, incorrect token counts for tool calls in context window management, and message import functionality to support the content field.

  • Fixed potential undefined size in FilePreview component to prevent runtime errors when size is not defined.
  • Handled token counts for tool_call messages in context window management to ensure accurate token calculations in BaseClient.js.
  • Updated message import functionality to support the content field, ensuring that messages with content are properly imported.

Change Type

  • Bug fix (non-breaking change which fixes an issue)

Testing

I tested these changes by:

  • FilePreview Component: Uploaded files with and without the size property to ensure the FilePreview component handles both cases without errors and displays progress correctly.
  • Context Window Management: Created conversations involving tool calls and verified that the token counts are calculated correctly without causing context window overflows.
  • Message Import Functionality: Imported conversations containing messages with the content field to confirm they are imported properly and display as expected in the chat history.

Test Configuration:

  • Environment: Local development environment
  • Node.js Version: Specify the version used, e.g., v14.17.0
  • Operating System: Specify your OS, e.g., Windows 10 / macOS Catalina / Ubuntu 20.04

Checklist

  • My code adheres to this project's style guidelines
  • I have performed a self-review of my own code
  • I have commented in any complex areas of my code
  • My changes do not introduce new warnings
  • Local unit tests pass with my changes

@danny-avila danny-avila changed the title 🐛 fix: Artifacts Issue from #5112, Tool Call Token Counts, and Agent Chat Import 🐛 fix: Artifacts Type Error, Tool Call Token Counts, and Agent Chat Import Dec 30, 2024
@danny-avila danny-avila changed the title 🐛 fix: Artifacts Type Error, Tool Call Token Counts, and Agent Chat Import 🐛 fix: Artifacts Type Error, Tool Token Counts, and Agent Chat Import Dec 30, 2024
@danny-avila danny-avila linked an issue Dec 30, 2024 that may be closed by this pull request
1 task
@danny-avila danny-avila merged commit 6c9a468 into main Dec 30, 2024
4 checks passed
@danny-avila danny-avila deleted the fix/agent-context branch December 30, 2024 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Unable to get Artifacts UI working locally
1 participant