run-llama / create-llama

The easiest way to get started with LlamaIndex
MIT License
1.05k stars 135 forks source link

feat: Add form filling use case #403

Closed leehuwuj closed 3 weeks ago

leehuwuj commented 3 weeks ago

Summary by CodeRabbit

changeset-bot[bot] commented 3 weeks ago

🦋 Changeset detected

Latest commit: a64df00feb1e41f6703cc6e87fffee4ea3216730

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | ------------ | ----- | | create-llama | Patch |

Not sure what this means? Click here to learn what changesets are.

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

coderabbitai[bot] commented 3 weeks ago

[!CAUTION]

Review failed

The pull request is closed.

Walkthrough

This pull request introduces a new "Form Filling" tool to the codebase, enhancing the existing toolset without altering current functionalities. The helpers/tools.ts file is updated to include this tool, which supports the "fastapi" framework and has specific dependencies. Additionally, the TemplateAgents type in helpers/types.ts is modified to include "form_filling". Other files are updated to integrate this new functionality into various workflows, including question handling and event processing related to form filling.

Changes

File Path Change Summary
helpers/tools.ts Added "Form Filling" tool with properties: display, name, supportedFrameworks, type, and dependencies.
helpers/types.ts Updated TemplateAgents type to include "form_filling".
questions/questions.ts Modified askProQuestions to include agent selection for "form_filling" under specific conditions.
questions/simple.ts Added "form_filling" to AppType and updated askSimpleQuestions and convertAnswers functions to handle the new application type.
templates/components/agents/python/blog/app/agents/publisher.py Changed key access from "document_generator" to "generate_document" in get_publisher_tools function.
templates/components/agents/python/blog/app/agents/researcher.py Expanded researcher_tool_names to include "duckduckgo_search" and "duckduckgo_image_search"; updated tool addition method from extend to append.
templates/components/agents/python/financial_report/app/agents/analyst.py Updated _get_analyst_params to check for "interpret" instead of "interpreter" in configured_tools.
templates/components/agents/python/financial_report/app/agents/reporter.py Changed key access from "document_generator" to "generate_document" in _get_reporter_params.
templates/components/agents/python/form_filling/README-template.md Introduced README template for form filling project, detailing setup and usage instructions.
templates/components/agents/python/form_filling/app/engine/engine.py Added get_chat_engine function to create and return a Workflow object for form filling.
templates/components/engines/python/agent/tools/init.py Updated from_env method to change tools variable type when map_result is True.
templates/components/engines/python/agent/tools/form_filling.py Introduced FormFillingTool class with methods for extracting and filling missing cell values in CSV files.
templates/components/multiagent/python/app/api/routers/vercel_response.py Updated _create_stream and content_generator methods in VercelStreamResponse class with new type annotations and streamlined event handling.
templates/components/multiagent/python/app/workflows/single.py Added AgentRunEventType enum and updated AgentRunEvent class to include event_type field; improved event handling structure.
templates/types/streaming/fastapi/app/api/routers/models.py Modified AnnotationFileData and ChatData classes to enhance file content retrieval and annotation processing.
templates/types/streaming/fastapi/app/services/file.py Removed _get_available_tools() method and simplified logic in process_private_file.
templates/types/streaming/nextjs/app/components/ui/chat/chat-agent-events.tsx Enhanced ChatAgentEvents component to handle progress updates alongside text messages.
templates/types/streaming/nextjs/app/components/ui/chat/index.ts Updated AgentEventData type to change property names and add event_type.
templates/types/streaming/nextjs/app/components/ui/progress.tsx Introduced Progress component for customizable progress bar.
templates/types/streaming/nextjs/package.json Added dependency "@radix-ui/react-progress": "^1.1.0".
.changeset/large-parents-exercise.md Introduced a new use case for form filling in Python under the "create-llama" patch.
templates/components/agents/python/form_filling/app/agents/form_filling.py Established a framework for managing a form-filling workflow, including various event classes and the create_workflow function.

Possibly related PRs

🐰 In a world of forms and filling,
A new tool comes, oh so thrilling!
With questions asked and answers found,
In CSVs, our joy is unbound!
So hop along, let's celebrate,
For form filling is truly great! 🥕


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)
🪧 Tips ### Chat There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai): - Review comments: Directly reply to a review comment made by CodeRabbit. Example: - `I pushed a fix in commit , 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 `@coderabbitai` in 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 `@coderabbitai` in 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 pause` to pause the reviews on a PR. - `@coderabbitai resume` to resume the paused reviews. - `@coderabbitai review` to trigger an incremental review. This is useful when automatic reviews are disabled for the repository. - `@coderabbitai full review` to do a full review from scratch and review all the files again. - `@coderabbitai summary` to regenerate the summary of the PR. - `@coderabbitai resolve` resolve all the CodeRabbit review comments. - `@coderabbitai configuration` to show the current CodeRabbit configuration for the repository. - `@coderabbitai help` to get help. ### Other keywords and placeholders - Add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed. - Add `@coderabbitai summary` to generate the high-level summary at a specific location in the PR description. - Add `@coderabbitai` anywhere in the PR title to generate the title automatically. ### Documentation and Community - Visit our [Documentation](https://coderabbit.ai/docs) for detailed information on how to use CodeRabbit. - Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback. - Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.
leehuwuj commented 3 weeks ago

@coderabbitai review

coderabbitai[bot] commented 3 weeks ago
:white_check_mark: Actions performed Review triggered. > Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.