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

main <- dev #915

Merged
merged 80 commits into from
Nov 29, 2024
Merged

main <- dev #915

merged 80 commits into from
Nov 29, 2024

Conversation

creatorrr
Copy link
Contributor

@creatorrr creatorrr commented Nov 29, 2024

Important

Enhance async operations, error handling, and configuration in the codebase, including async S3 operations and workflow execution updates.

  • Async Operations:
    • Introduced async_s3.py for asynchronous S3 operations, replacing s3.py.
    • Updated store_in_blob_store_if_large() and load_from_blob_store_if_remote() in storage_handler.py to be async.
    • Added cozo_query_async decorator in models/utils.py for async Cozo queries.
  • Workflow Execution:
    • Updated TaskExecutionWorkflow in task_execution/__init__.py to use async activities.
    • Modified continue_as_child() and other helper functions in task_execution/helpers.py to support async operations.
  • Error Handling:
    • Enhanced rewrap_exceptions in models/utils.py to support async functions.
    • Improved retry logic in cozo_query_async with tenacity for handling resource busy errors.
  • Configuration and Dependencies:
    • Updated gunicorn_conf.py to adjust worker count based on debug mode.
    • Updated pyproject.toml to include aiobotocore and async-lru for async operations.
  • Miscellaneous:
    • Fixed duplicate imports and minor code cleanup in several files.
    • Adjusted logging and error messages for better clarity.

This description was created by Ellipsis for 42fda1f. It will automatically update as commits are pushed.

creatorrr and others added 30 commits November 13, 2024 14:14
Signed-off-by: Diwank Singh Tomer <[email protected]>

<!-- ELLIPSIS_HIDDEN -->


----

> [!IMPORTANT]
> Tune RocksDB options in `memory-store/options` to enhance performance
by adjusting buffer sizes, job limits, and compression settings.
> 
>   - **DBOptions**:
>     - Increase `max_background_jobs` from 6 to 16.
>     - Increase `max_subcompactions` from 1 to 2.
> - Increase `writable_file_max_buffer_size` from 1048576 to 5048576.
>     - Set `create_if_missing` to true.
>     - Increase `WAL_size_limit_MB` from 0 to 512.
>     - Enable `use_fsync`.
>   - **CFOptions "default"**:
>     - Increase `write_buffer_size` from 134217728 to 267108864.
>     - Increase `max_write_buffer_number` from 5 to 25.
>     - Increase `level0_file_num_compaction_trigger` from 4 to 16.
>     - Increase `max_compaction_bytes` from 1677721600 to 2677721600.
>     - Change `compression` from `kLZ4Compression` to `kNoCompression`.
> - Increase `max_write_buffer_size_to_maintain` from 134217728 to
534217728.
>     - Increase `min_write_buffer_number_to_merge` from 1 to 4.
> 
> <sup>This description was created by </sup>[<img alt="Ellipsis"
src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=julep-ai%2Fjulep&utm_source=github&utm_medium=referral)<sup>
for 1aab742. It will automatically
update as commits are pushed.</sup>


<!-- ELLIPSIS_HIDDEN -->

---------

Signed-off-by: Diwank Singh Tomer <[email protected]>
Co-authored-by: Ahmad-mtos <[email protected]>
When a `retry`-decorated function finishes the maximum amount of retries
and still throws an error, `tenacity` throws an error with type
`RetryError`, so I added that to the list of retryable errors
<!-- ELLIPSIS_HIDDEN -->

----

> [!IMPORTANT]
> Added `RetryError` to `RETRYABLE_ERROR_TYPES` in `tasks.py` to handle
exhausted retry cases.
> 
>   - **Error Handling**:
> - Added `RetryError` to `RETRYABLE_ERROR_TYPES` in `tasks.py` to
handle cases where a `retry`-decorated function exhausts retries and
throws this error.
> 
> <sup>This description was created by </sup>[<img alt="Ellipsis"
src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=julep-ai%2Fjulep&utm_source=github&utm_medium=referral)<sup>
for d200077. It will automatically
update as commits are pushed.</sup>

<!-- ELLIPSIS_HIDDEN -->
<!-- ELLIPSIS_HIDDEN -->



> [!IMPORTANT]
> Convert `AssertionError` to HTTP 422 error in
`prepare_execution_input.py`.
> 
>   - **Error Handling**:
> - Convert `AssertionError` to HTTP 422 error in
`prepare_execution_input.py` using `rewrap_exceptions` decorator.
> 
> <sup>This description was created by </sup>[<img alt="Ellipsis"
src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=julep-ai%2Fjulep&utm_source=github&utm_medium=referral)<sup>
for b07f915. It will automatically
update as commits are pushed.</sup>

<!-- ELLIPSIS_HIDDEN -->
)

<!-- ELLIPSIS_HIDDEN -->


> [!IMPORTANT]
> Add handling for `AssertionError` in `prepare_execution_input.py`,
mapping it to HTTP 429 error.
> 
>   - **Error Handling**:
> - Add handling for `AssertionError` in `prepare_execution_input.py`,
mapping it to `HTTPException` with status code 429.
> 
> <sup>This description was created by </sup>[<img alt="Ellipsis"
src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=julep-ai%2Fjulep&utm_source=github&utm_medium=referral)<sup>
for 901bec8. It will automatically
update as commits are pushed.</sup>


<!-- ELLIPSIS_HIDDEN -->
Signed-off-by: Diwank Singh Tomer <[email protected]>
…tions (#836)

<!-- ELLIPSIS_HIDDEN -->


> [!IMPORTANT]
> Enhances error handling in integration executions by introducing
`ExecutionError` and updating functions to return it on exceptions.
> 
>   - **Behavior**:
> - `execute_integration` in `execute_integration.py` raises an
exception if `integration_service_response` contains an error.
> - Integration functions in `brave.py`, `browserbase.py`, `email.py`,
`llama_parse.py`, `remote_browser.py`, `spider.py`, `weather.py`, and
`wikipedia.py` return `ExecutionError` on exceptions.
>   - **Models**:
> - Adds `ExecutionError` model to `execution.py` to encapsulate error
messages.
>   - **Functions**:
> - Updates return types of integration functions to include
`ExecutionError` in `brave.py`, `browserbase.py`, `email.py`,
`llama_parse.py`, `remote_browser.py`, `spider.py`, `weather.py`, and
`wikipedia.py`.
> 
> <sup>This description was created by </sup>[<img alt="Ellipsis"
src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=julep-ai%2Fjulep&utm_source=github&utm_medium=referral)<sup>
for 968fe53. It will automatically
update as commits are pushed.</sup>


<!-- ELLIPSIS_HIDDEN -->

---------

Co-authored-by: HamadaSalhab <[email protected]>
…on input (#842)

<!-- ELLIPSIS_HIDDEN -->



> [!IMPORTANT]
> Change `AssertionError` handling in `prepare_execution_input.py` to
return status code 429 with a retry header.
> 
>   - **Behavior**:
> - Change `AssertionError` handling in `prepare_execution_input.py` to
return status code 429 instead of 422.
> - Add `x-should-retry: true` header to `AssertionError` responses,
indicating retry capability.
> 
> <sup>This description was created by </sup>[<img alt="Ellipsis"
src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=julep-ai%2Fjulep&utm_source=github&utm_medium=referral)<sup>
for 9719afe. It will automatically
update as commits are pushed.</sup>

<!-- ELLIPSIS_HIDDEN -->
…he pip group (#849)

[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=aiohttp&package-manager=pip&previous-version=3.10.10&new-version=3.10.11)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/julep-ai/julep/network/alerts).

</details>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
- **feat(typespec,agents-api): Add files api models**
- **feat(agents-api): Add files relation to cozo**
- **feat(typespec,agents-api): Add file cozo queries**

<!-- ELLIPSIS_HIDDEN -->

----

> [!IMPORTANT]
> Add file storage API to agents-api and typespec, including models,
endpoints, and tests for file operations.
> 
>   - **Behavior**:
>     - Adds file storage API to `agents-api` and `typespec`.
>     - Supports creating, retrieving, and deleting files.
>   - **Models**:
> - Adds `File` and `CreateFileRequest` models in
`agents-api/autogen/Files.py` and `typespec/files/models.tsp`.
>   - **Endpoints**:
> - Adds `FilesRoute` in `typespec/main.tsp` and
`typespec/files/endpoints.tsp` for file operations.
>   - **Routers**:
> - Adds `files_router` in `agents-api/routers/__init__.py` and
`agents-api/routers/files` for handling file routes.
>   - **Database**:
> - Creates `files` relation in
`migrations/migrate_1731953383_create_files_relation.py`.
>   - **Tests**:
> - Adds tests for file operations in `tests/test_files_queries.py` and
`tests/test_files_routes.py`.
> 
> <sup>This description was created by </sup>[<img alt="Ellipsis"
src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=julep-ai%2Fjulep&utm_source=github&utm_medium=referral)<sup>
for 271076b. It will automatically
update as commits are pushed.</sup>

<!-- ELLIPSIS_HIDDEN -->

---------

Signed-off-by: Diwank Singh Tomer <[email protected]>
Co-authored-by: creatorrr <[email protected]>
Co-authored-by: vedantsahai18 <[email protected]>
…851)

<!-- ELLIPSIS_HIDDEN -->



> [!IMPORTANT]
> Refactor `execute_system` in `execute_system.py` to improve background
task handling for 'create' and 'chat' operations on 'doc' subresource.
> 
>   - **Behavior**:
> - Refactor `execute_system` in `execute_system.py` to handle
background tasks by creating `BackgroundTasks` instance before handler
call and awaiting it after.
>     - Applied to 'create' and 'chat' operations for 'doc' subresource.
>   - **Misc**:
>     - No changes to search operations or regular operations handling.
> 
> <sup>This description was created by </sup>[<img alt="Ellipsis"
src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=julep-ai%2Fjulep&utm_source=github&utm_medium=referral)<sup>
for d216f34. It will automatically
update as commits are pushed.</sup>

<!-- ELLIPSIS_HIDDEN -->
<!-- ELLIPSIS_HIDDEN -->


> [!IMPORTANT]
> Add FFmpeg and Cloudinary integrations, update models and
configurations, and enhance media processing functionalities.
> 
>   - **Integrations**:
> - Add FFmpeg and Cloudinary integrations in `integrations-service`.
>     - Update `providers.py` to include FFmpeg and Cloudinary.
>     - Add `cloudinary.py` and `ffmpeg.py` for handling operations.
>   - **Models**:
>     - Add new models for Cloudinary and FFmpeg in `Tools.py`.
> - Update `Chat.py`, `Entries.py`, and `Tasks.py` with new content
models.
>   - **Configurations**:
>     - Update `Dockerfile` to install FFmpeg.
>     - Add `GEMINI_API_KEY` to `.env.example` and `docker-compose.yml`.
>     - Update `gunicorn_conf.py` for logging and worker management.
>   - **Functions**:
>     - Modify `execute_integration.py` for robust error handling.
>     - Update `execute_system.py` to support session creation.
> - Enhance `base_evaluate.py` with increased `MAX_STRING_LENGTH` and
deep blob storage.
>   - **Misc**:
>     - Update `litellm-config.yaml` with new Gemini models.
>     - Add new TypeSpec files for Cloudinary and FFmpeg.
> 
> <sup>This description was created by </sup>[<img alt="Ellipsis"
src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=julep-ai%2Fjulep&utm_source=github&utm_medium=referral)<sup>
for 0fe1cec. It will automatically
update as commits are pushed.</sup>


<!-- ELLIPSIS_HIDDEN -->

---------

Signed-off-by: Diwank Singh Tomer <[email protected]>
Co-authored-by: Ahmad-mtos <[email protected]>
Co-authored-by: Ahmad-mtos <[email protected]>
Co-authored-by: Vedantsahai18 <[email protected]>
Co-authored-by: HamadaSalhab <[email protected]>
Co-authored-by: HamadaSalhab <[email protected]>
Co-authored-by: Diwank Singh Tomer <[email protected]>
…rious integrations (#855)

<!-- ELLIPSIS_HIDDEN -->



> [!IMPORTANT]
> Add environment variable handling for API keys in integration services
using `environs`.
> 
>   - **Environment Variables**:
> - Add `env.py` to load API keys and other sensitive data using
`environs`.
> - Update `docker-compose.yml` to include new environment variables for
integrations.
>   - **Integration Updates**:
> - Modify `brave.py`, `browserbase.py`, `cloudinary.py`, `email.py`,
`llama_parse.py`, `spider.py`, and `weather.py` to use environment
variables for API keys.
> - Replace hardcoded 'DEMO_API_KEY' and similar placeholders with
actual environment variables.
>   - **Dependencies**:
> - Add `environs` to `pyproject.toml` for environment variable
management.
> 
> <sup>This description was created by </sup>[<img alt="Ellipsis"
src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=julep-ai%2Fjulep&utm_source=github&utm_medium=referral)<sup>
for 65d5c0a. It will automatically
update as commits are pushed.</sup>

<!-- ELLIPSIS_HIDDEN -->
<!-- ELLIPSIS_HIDDEN -->


> [!IMPORTANT]
> Remove unnecessary environment variables from `docker-compose.yml` and
`env.py`.
> 
>   - **Environment Variables**:
> - Removed `RAPID_API_KEY`, `RAPID_API_HOST`, `ARYSHARE_KEY`, and
`ARYSHARE_PROFILE_ID` from `docker-compose.yml` and `env.py` as they are
no longer needed.
> 
> <sup>This description was created by </sup>[<img alt="Ellipsis"
src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=julep-ai%2Fjulep&utm_source=github&utm_medium=referral)<sup>
for 73e3a8a. It will automatically
update as commits are pushed.</sup>


<!-- ELLIPSIS_HIDDEN -->
Signed-off-by: Diwank Singh Tomer <[email protected]>
<!-- ELLIPSIS_HIDDEN -->



> [!IMPORTANT]
> Fixes `create_session` in `browserbase.py` to correctly use
`browserbase_project_id` for `DEMO_PROJECT_ID`.
> 
>   - **Behavior**:
> - Fixes `create_session` in `browserbase.py` to correctly assign
`project_id` from `browserbase_project_id` when `DEMO_PROJECT_ID` is
used.
> 
> <sup>This description was created by </sup>[<img alt="Ellipsis"
src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=julep-ai%2Fjulep&utm_source=github&utm_medium=referral)<sup>
for 9794352. It will automatically
update as commits are pushed.</sup>

<!-- ELLIPSIS_HIDDEN -->
<!-- ELLIPSIS_HIDDEN -->


> [!IMPORTANT]
> Standardized cookbook file names and removed outdated files for
improved consistency and organization.
> 
>   - **File Renames**:
>     - `01-Website_Crawler_using_Spider.py` to `01-website-crawler.py`.
> - `02-Sarcastic_News_Headline_Generator.py` to
`02-sarcastic-news-headline-generator.py`.
> - `04-TripPlanner_With_Weather_And_WikiInfo.py` to
`03-trip-planning-assistant.py`.
> - `17-Hook-Generator-Trending-Reels.py` to
`04-hook-generator-trending-reels.py`.
>   - **File Deletions**:
> - Removed 13 outdated files including
`03-SmartResearcher_With_WebSearch.py`,
`05-Basic_Agent_Creation_and_Interaction.py`, and
`06-Designing_Multi-Step_Tasks.py`.
> 
> <sup>This description was created by </sup>[<img alt="Ellipsis"
src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=julep-ai%2Fjulep&utm_source=github&utm_medium=referral)<sup>
for 27fe0e6. It will automatically
update as commits are pushed.</sup>


<!-- ELLIPSIS_HIDDEN -->

---------

Co-authored-by: vedantsahai18 <[email protected]>
<!-- ELLIPSIS_HIDDEN -->



> [!IMPORTANT]
> Update `cookbooks/README.md` to add new notebooks and remove outdated
ones, with updated descriptions and links.
> 
>   - **Notebook Updates**:
> - Added `00-Devfest-Email-Assistant.ipynb`,
`04-Hook_Generator_Trending_Reels.ipynb`,
`05-Video_Processing_With_Natural_Language.ipynb`,
`06-Browser_Use.ipynb`.
> - Removed `03-SmartResearcher_With_WebSearch.ipynb`,
`04-TripPlanner_With_Weather_And_WikiInfo.ipynb`,
`05-Basic_Agent_Creation_and_Interaction.ipynb`,
`06-Designing_Multi-Step_Tasks.ipynb`,
`07-Integrating_External_Tools_and_APIs.ipynb`,
`08-Managing_Persistent_Sessions.ipynb`,
`09-User_Management_and_Personalization.ipynb`,
`10-Document_Management_and_Search.ipynb`,
`11-Advanced_Chat_Interactions.ipynb`,
`12-Monitoring_Task_Executions.ipynb`,
`13-Error_Handling_and_Recovery.ipynb`.
>   - **Misc**:
>     - Fixed table formatting in `cookbooks/README.md`.
>     - Removed trailing newline in `cookbooks/README.md`.
> 
> <sup>This description was created by </sup>[<img alt="Ellipsis"
src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=julep-ai%2Fjulep&utm_source=github&utm_medium=referral)<sup>
for 5ec16c4. It will automatically
update as commits are pushed.</sup>

<!-- ELLIPSIS_HIDDEN -->
<!-- ELLIPSIS_HIDDEN -->



> [!IMPORTANT]
> Update image source and "Explore Docs" link text in README files
across multiple languages.
> 
>   - **Image Update**:
> - Updated image source in `README-CN.md`, `README-FR.md`,
`README-JA.md`, `README.md`, and `cookbooks/README.md` to
`https://github.com/user-attachments/assets/10ba11e4-4ced-400e-a400-ee0f72541780`.
>   - **Text Changes**:
> - Added "(wip)" to "Explore Docs" link in `README.md` and its
translations.
> - Updated "Explore Docs" link text in `README-CN.md`, `README-FR.md`,
and `README-JA.md` to indicate work in progress.
> - Updated "Explore Docs" link text in `README.md` to "Explore Docs
(wip)".
> 
> <sup>This description was created by </sup>[<img alt="Ellipsis"
src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=julep-ai%2Fjulep&utm_source=github&utm_medium=referral)<sup>
for 7831671. It will automatically
update as commits are pushed.</sup>

<!-- ELLIPSIS_HIDDEN -->

---------

Co-authored-by: Diwank Singh Tomer <[email protected]>
Co-authored-by: creatorrr <[email protected]>
…nged to include imageurl in ChatInput (#835)

<!-- ELLIPSIS_HIDDEN -->


> [!IMPORTANT]
> Integrates Anthropic API into chat endpoint, updates models for image
content, and improves tool formatting and error handling.
> 
>   - **Behavior**:
> - Added Anthropic API call in `chat.py` for tool types
`computer_20241022`, `bash_20241022`, `text_editor_20241022`.
> - Updated `request_anthropic()` to format messages and call Anthropic
API.
>     - Modified tool formatting logic in `chat.py` for Anthropic tools.
>   - **Models**:
> - Added `ChatMLAnthropicImageContentPart` and related models in
`models.tsp` for Anthropic image content.
> - Updated `ChatMLContentPart` alias to include
`ChatMLAnthropicImageContentPart`.
>   - **Misc**:
> - Updated `openapi-1.0.0.yaml` to reflect changes in `ChatInput` and
related schemas.
> - Added `Source` class in `Chat.py`, `Entries.py`, and `Tasks.py` for
base64 image data.
> - Improved error handling in `execute_integration.py` and
`execute_system.py`.
> - Updated Gunicorn configuration in `gunicorn_conf.py` for testing and
debugging.
> - Added `GEMINI_API_KEY` to `.env.example` and `docker-compose.yml`.
> 
> <sup>This description was created by </sup>[<img alt="Ellipsis"
src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=julep-ai%2Fjulep&utm_source=github&utm_medium=referral)<sup>
for bc0e0d4. It will automatically
update as commits are pushed.</sup>


<!-- ELLIPSIS_HIDDEN -->

---------

Signed-off-by: Diwank Singh Tomer <[email protected]>
Co-authored-by: Ahmad-mtos <[email protected]>
Co-authored-by: Ahmad-mtos <[email protected]>
Co-authored-by: Vedantsahai18 <[email protected]>
Co-authored-by: HamadaSalhab <[email protected]>
Co-authored-by: HamadaSalhab <[email protected]>
Co-authored-by: Diwank Singh Tomer <[email protected]>
Signed-off-by: Diwank Singh Tomer <[email protected]>

<!-- ELLIPSIS_HIDDEN -->


----

> [!IMPORTANT]
> Limit free users to 50 sessions and executions, adding counting
functions and tests for these limits.
> 
>   - **Behavior**:
> - Limit free users to 50 sessions and 50 executions by adding
`MAX_FREE_SESSIONS` and `MAX_FREE_EXECUTIONS` to `.env.example` and
`env.py`.
> - Implement `count_executions()` in `count_executions.py` to count
executions for a given `developer_id` and `task_id`.
> - Implement `count_sessions()` in `count_sessions.py` to count
sessions for a given `developer_id`.
>   - **API Changes**:
> - Update `chat()` in `chat.py` to enforce session limits for free
users.
> - Update `create_task_execution()` in `create_task_execution.py` to
enforce execution limits for free users.
>   - **Tests**:
> - Add tests for `count_executions()` in `test_execution_queries.py`.
>     - Add tests for `count_sessions()` in `test_session_queries.py`.
>   - **Misc**:
> - Remove unused imports `JinjaTemplate` from `Tasks.py`, `RootModel`
from `Tools.py`, and `RemoteList` from `temporal.py`.
> 
> <sup>This description was created by </sup>[<img alt="Ellipsis"
src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=julep-ai%2Fjulep&utm_source=github&utm_medium=referral)<sup>
for 71043d0. It will automatically
update as commits are pushed.</sup>


<!-- ELLIPSIS_HIDDEN -->

---------

Signed-off-by: Diwank Singh Tomer <[email protected]>
Co-authored-by: vedantsahai18 <[email protected]>
Co-authored-by: Vedantsahai18 <[email protected]>
Co-authored-by: HamadaSalhab <[email protected]>
<!-- ELLIPSIS_HIDDEN -->



> [!IMPORTANT]
> Commented out a line in `aembedding()` in `litellm.py` to prevent
errors with `voyage/voyage-3` model.
> 
>   - **Behavior**:
> - Commented out line in `aembedding()` in `litellm.py` to prevent
errors with `voyage/voyage-3` model.
>     - The line `model = f"openai/{model}"` is temporarily disabled.
>   - **Misc**:
>     - No other changes or fixes are included in this PR.
> 
> <sup>This description was created by </sup>[<img alt="Ellipsis"
src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=julep-ai%2Fjulep&utm_source=github&utm_medium=referral)<sup>
for 3d429be. It will automatically
update as commits are pushed.</sup>

<!-- ELLIPSIS_HIDDEN -->

---------

Co-authored-by: HamadaSalhab <[email protected]>
<!-- ELLIPSIS_HIDDEN -->



> [!IMPORTANT]
> Introduces `IntegrationExecutionException` for integration execution
errors and updates retry logic to handle it.
> 
>   - **Behavior**:
> - Introduces `IntegrationExecutionException` in `tools.py` for errors
during integration execution.
> - Updates `execute_integration()` in `execute_integration.py` to raise
`IntegrationExecutionException` on integration service errors.
>   - **Error Handling**:
> - Adds `IntegrationExecutionException` to `RETRYABLE_ERROR_TYPES` in
`tasks.py` to allow retries for integration execution errors.
> 
> <sup>This description was created by </sup>[<img alt="Ellipsis"
src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=julep-ai%2Fjulep&utm_source=github&utm_medium=referral)<sup>
for 11edfc0. It will automatically
update as commits are pushed.</sup>

<!-- ELLIPSIS_HIDDEN -->

---------

Co-authored-by: HamadaSalhab <[email protected]>
Closes #872
<!-- ELLIPSIS_HIDDEN -->


----

> [!IMPORTANT]
> Fixes and updates quick start examples in `README.md`, including
search query count, API placeholders, and workflow steps.
> 
>   - **Quick Example**:
>     - Change number of search queries from 100 to 30.
>     - Update `api_key` and `url` placeholders in `tools` section.
> - Modify `main` workflow steps for clarity and accuracy, including
`prompt`, `evaluate`, and `tool` steps.
>   - **Misc**:
>     - Add `num_questions` to `input_schema`.
>     - Adjust `parallelism` from 10 to 5 in web search step.
>     - Limit Discord message content to 2000 characters.
> 
> <sup>This description was created by </sup>[<img alt="Ellipsis"
src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=julep-ai%2Fjulep&utm_source=github&utm_medium=referral)<sup>
for 7063583. It will automatically
update as commits are pushed.</sup>


<!-- ELLIPSIS_HIDDEN -->
<!-- ELLIPSIS_HIDDEN -->



> [!IMPORTANT]
> Fixes blob store handling, improves retry logic, and updates
configurations for agents API, memory store, and scheduler.
> 
>   - **Blob Store Handling**:
> - In `execute_system.py`, added logic to load arguments from blob
store if they contain `bucket` and `key`.
> - In `storage_handler.py`, updated `load_from_blob_store_if_remote()`
to handle dicts with `bucket` and `key`.
>   - **Retry Logic**:
> - In `models/utils.py`, increased retry attempts from 2 to 4 in
`is_resource_busy()`.
> - Updated error handling in `cozo_query()` to check both `e` and
`e.resp` for 'busy' status.
>   - **Workflow Execution**:
> - In `helpers.py`, modified `execute_if_else_branch()` to handle
`None` else_branch by setting a default `EvaluateStep`.
>   - **Configuration Updates**:
> - In `memory-store/docker-compose.yml`, added `develop` section for
file watching and rebuild actions.
> - In `memory-store/options`, increased `max_background_jobs` to 32 and
`max_subcompactions` to 8.
> - In `scheduler/docker-compose.yml`, set `temporal-db-data` volume to
external.
> 
> <sup>This description was created by </sup>[<img alt="Ellipsis"
src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=julep-ai%2Fjulep&utm_source=github&utm_medium=referral)<sup>
for fa011a9. It will automatically
update as commits are pushed.</sup>

<!-- ELLIPSIS_HIDDEN -->

---------

Co-authored-by: Julep Developers <[email protected]>
Co-authored-by: whiterabbit1983 <[email protected]>
<!-- ELLIPSIS_HIDDEN -->



> [!IMPORTANT]
> Add OpenRouter models and update environment and Docker configuration
for new API key support, with a hotfix for Mistral API in `litellm.py`.
> 
>   - **Configuration**:
> - Add OpenRouter models `mistral-large-2411` and
`qwen-2.5-72b-instruct` to `litellm-config.yaml`.
> - Update `.env.example` and `docker-compose.yml` to include
`OPENROUTER_API_KEY`.
>   - **Code**:
> - Add hotfix in `acompletion()` in `litellm.py` for Mistral API
message format.
> 
> <sup>This description was created by </sup>[<img alt="Ellipsis"
src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=julep-ai%2Fjulep&utm_source=github&utm_medium=referral)<sup>
for ecd3f03. It will automatically
update as commits are pushed.</sup>

<!-- ELLIPSIS_HIDDEN -->
…886)

<!-- ELLIPSIS_HIDDEN -->



> [!IMPORTANT]
> Increase Temporal workflows and activities timeouts using
`temporal_schedule_to_close_timeout` with a default of 3600 seconds.
> 
>   - **Behavior**:
> - Increase `schedule_to_close_timeout` for Temporal workflows and
activities using `temporal_schedule_to_close_timeout` in
`storage_handler.py`, `embed_docs.py`, `mem_mgmt.py`, `mem_rating.py`,
`summarization.py`, `task_execution/__init__.py`, `transition.py`, and
`truncation.py`.
> - Default timeout set to 3600 seconds in `env.py` and
`docker-compose.yml`.
>   - **Environment**:
> - Add `temporal_schedule_to_close_timeout` to `env.py` and
`docker-compose.yml` with a default of 3600 seconds.
> 
> <sup>This description was created by </sup>[<img alt="Ellipsis"
src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=julep-ai%2Fjulep&utm_source=github&utm_medium=referral)<sup>
for 4cb9d17. It will automatically
update as commits are pushed.</sup>

<!-- ELLIPSIS_HIDDEN -->

---------

Co-authored-by: HamadaSalhab <[email protected]>
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
<!-- ELLIPSIS_HIDDEN -->



> [!IMPORTANT]
> Switch to `larch.pickle` for serialization in
`agents_api/worker/codec.py` to avoid `DeadlockError`, update
Dockerfiles, Gunicorn configurations, and dependencies.
> 
>   - **Serialization**:
> - Replace `pickle` with `larch.pickle` in `agents_api/worker/codec.py`
to avoid `DeadlockError`.
> - Add logging for serialization/deserialization time if it exceeds 1
second.
>   - **Docker**:
> - Add `libboost-all-dev` to `agents-api/Dockerfile` and
`Dockerfile.worker`.
>   - **Gunicorn Configuration**:
> - Change worker count calculation to `multiprocessing.cpu_count() //
2` in `gunicorn_conf.py` and `integrations-service/gunicorn_conf.py`.
>   - **Dependencies**:
>     - Add `larch-pickle` to `pyproject.toml`.
>   - **Miscellaneous**:
> - Update `temporalio/auto-setup` image to `1.25.2` in
`scheduler/docker-compose.yml`.
> - Increase `max_connections` to `1000` for `temporal-db` in
`scheduler/docker-compose.yml`.
> 
> <sup>This description was created by </sup>[<img alt="Ellipsis"
src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=julep-ai%2Fjulep&utm_source=github&utm_medium=referral)<sup>
for a546477. It will automatically
update as commits are pushed.</sup>

<!-- ELLIPSIS_HIDDEN -->

Co-authored-by: Julep Developers <[email protected]>
whiterabbit1983 and others added 23 commits November 29, 2024 12:26
Signed-off-by: Diwank Singh Tomer <[email protected]>
Signed-off-by: Diwank Singh Tomer <[email protected]>
feat(agents-api): Add async boto client
chore(agents-api): Run sync system tool executions in new processes
fix(agents-api): Fix cozo query retry logic
@creatorrr creatorrr marked this pull request as ready for review November 29, 2024 15:07
Copy link
Contributor

@standard-input standard-input bot left a comment

Choose a reason for hiding this comment

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

No issues flagged.
Standard Input can make mistakes. Check important info.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me! Reviewed everything up to 42fda1f in 1 minute and 57 seconds

More details
  • Looked at 2316 lines of code in 47 files
  • Skipped 2 files when reviewing.
  • Skipped posting 4 drafted comments based on config settings.
1. agents-api/agents_api/activities/execute_system.py:111
  • Draft comment:
    Ensure handler is a coroutine before using await. If handler is not a coroutine, this will raise a runtime error.
  • Reason this comment was not posted:
    Comment did not seem useful.
2. agents-api/agents_api/activities/sync_items_remote.py:11
  • Draft comment:
    Ensure store_in_blob_store_if_large is a coroutine before using await. If it is not a coroutine, this will raise a runtime error.
  • Reason this comment was not posted:
    Marked as duplicate.
3. agents-api/agents_api/activities/task_steps/evaluate_step.py:26
  • Draft comment:
    Ensure context.prepare_for_step is a coroutine before using await. If it is not a coroutine, this will raise a runtime error.
  • Reason this comment was not posted:
    Marked as duplicate.
4. agents-api/agents_api/activities/task_steps/for_each_step.py:21
  • Draft comment:
    Ensure context.prepare_for_step is a coroutine before using await. If it is not a coroutine, this will raise a runtime error.
  • Reason this comment was not posted:
    Marked as duplicate.

Workflow ID: wflow_ID8yDtQZRJIrJJKs


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@Vedantsahai18 Vedantsahai18 merged commit 24340ec into main Nov 29, 2024
14 of 19 checks passed
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.

5 participants