feat(weave): Exa integration
This PR adds Exa integration.
- The cost calculations are wrong as I am not sure how to update the cost manually
- Tokens is set to 1 as it is actually not token-based
Summary by CodeRabbit
- New Features
- Introduced Exa integration support within the autopatching system, allowing dynamic patch application and rollback.
- Enhanced operational handling with improved configuration defaults and input processing for a more streamlined experience.
Walkthrough
This update introduces a new Exa integration into the Weave framework. A dedicated module is added that includes functions to wrap operations, handle completion events, and postprocess inputs. The integration exposes a public interface via the get_exa_patcher function. Additionally, the autopatching system is enhanced to support Exa by including a new integration setting and updating the autopatch routines to apply and revert patches based on Exa operations.
Changes
| File(s) | Change Summary |
|---|---|
weave/integrations/exa/__init__.pyweave/integrations/exa/exa_sdk.py |
New Exa integration module created. It introduces functions such as exa_on_finish, postprocess_inputs, exa_wrapper, and get_exa_patcher (exported as the public interface). |
weave/trace/autopatch.py |
Autopatching system updated to include Exa integration. Added an exa field in AutopatchSettings and modified the autopatch and reset_autopatch functions to invoke get_exa_patcher for patching. |
Sequence Diagram(s)
sequenceDiagram
participant U as User
participant A as Autopatch System
participant E as Exa Integration
participant P as Patcher
U->>A: Call autopatch(settings)
A->>E: get_exa_patcher(settings.exa)
E-->>A: Return Exa Patcher
A->>P: attempt_patch()
U->>A: Call reset_autopatch()
A->>E: get_exa_patcher()
E-->>A: Return Exa Patcher
A->>P: undo_patch()
Poem
Hop along the code, I say,
Fresh Exa patches light the way.
With each brave step we redefine,
Bugs retreat as updates shine!
A rabbit's cheer, ASCII delight 🐇✨.
[!TIP]
⚡🧪 Multi-step agentic review comment chat (experimental)
- We're introducing multi-step agentic chat in review comments. This experimental feature enhances review discussions with the CodeRabbit agentic chat by enabling advanced interactions, including the ability to create pull requests directly from comments. - To enable this feature, set early_access to true under in the settings.
✨ Finishing Touches
- [ ] 📝 Generate Docstrings
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
🪧 Tips
Chat
There are 3 ways to chat with CodeRabbit:
- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
I pushed a fix in commit <commit_id>, please review it.Generate unit testing code for this file.Open a follow-up GitHub issue for this discussion.
- Files and specific lines of code (under the "Files changed" tab): Tag
@coderabbitaiin a new review comment at the desired location with your query. Examples:@coderabbitai generate unit testing code for this file.@coderabbitai modularize this function.
- PR comments: Tag
@coderabbitaiin a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.@coderabbitai read src/utils.ts and generate unit testing code.@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.@coderabbitai help me debug CodeRabbit configuration file.
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.
CodeRabbit Commands (Invoked using PR comments)
@coderabbitai pauseto pause the reviews on a PR.@coderabbitai resumeto resume the paused reviews.@coderabbitai reviewto trigger an incremental review. This is useful when automatic reviews are disabled for the repository.@coderabbitai full reviewto do a full review from scratch and review all the files again.@coderabbitai summaryto regenerate the summary of the PR.@coderabbitai generate docstringsto generate docstrings for this PR.@coderabbitai resolveresolve all the CodeRabbit review comments.@coderabbitai configurationto show the current CodeRabbit configuration for the repository.@coderabbitai helpto get help.
Other keywords and placeholders
- Add
@coderabbitai ignoreanywhere in the PR description to prevent this PR from being reviewed. - Add
@coderabbitai summaryto generate the high-level summary at a specific location in the PR description. - Add
@coderabbitaianywhere in the PR title to generate the title automatically.
Documentation and Community
- Visit our Documentation for detailed information on how to use CodeRabbit.
- Join our Discord Community to get help, request features, and share feedback.
- Follow us on X/Twitter for updates and announcements.
Preview this PR with FeatureBee: https://beta.wandb.ai/?betaVersion=5e24fb2b1d5ef56d11ab8c5afb590ed796b9e88f
Hey @tcapelle what's the plan with this integration?
I am stuck on how to add the costs to the trace.