Commit Graph

240 Commits (ec2273aac2edf374aaa7d375df0e133182164c5b)

Author SHA1 Message Date
Swifty aa883d8465
feat(platform): updated schema to allow featuring of specific creators (#9048)
updated schema to allow featuring of specific creators
2024-12-18 13:32:03 +00:00
Swifty 9d93704264
feat(platform): Add basic library functionality (#9043)
Add functionality to allow users to add agents to their library from the
store page.
2024-12-18 14:01:48 +01:00
SwiftyOS e27d7a2efb revert upgrade of crypto lib 2024-12-17 14:19:41 +01:00
SwiftyOS 41be88f0bf Update dependencies 2024-12-17 11:07:13 +01:00
dependabot[bot] 9f9097c62f
chore(backend/deps): Update `cryptography` from 43.0.3 to 44.0.0 (#8870)
Bumps [cryptography](https://github.com/pyca/cryptography) from 43.0.3
to 44.0.0.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst">cryptography's
changelog</a>.</em></p>
<blockquote>
<p>44.0.0 - 2024-11-27</p>
<pre><code>
* **BACKWARDS INCOMPATIBLE:** Dropped support for LibreSSL &lt; 3.9.
* Deprecated Python 3.7 support. Python 3.7 is no longer supported by
the
  Python core team. Support for Python 3.7 will be removed in a future
  ``cryptography`` release.
* Updated Windows, macOS, and Linux wheels to be compiled with OpenSSL
3.4.0.
* macOS wheels are now built against the macOS 10.13 SDK. Users on older
  versions of macOS should upgrade, or they will need to build
  ``cryptography`` themselves.
* Enforce the :rfc:`5280` requirement that extended key usage extensions
must
  not be empty.
* Added support for timestamp extraction to the
  :class:`~cryptography.fernet.MultiFernet` class.
* Relax the Authority Key Identifier requirements on root CA
certificates
  during X.509 verification to allow fields permitted by :rfc:`5280` but
  forbidden by the CA/Browser BRs.
* Added support for
:class:`~cryptography.hazmat.primitives.kdf.argon2.Argon2id`
  when using OpenSSL 3.2.0+.
* Added support for the :class:`~cryptography.x509.Admissions`
certificate extension.
* Added basic support for PKCS7 decryption (including S/MIME 3.2) via

:func:`~cryptography.hazmat.primitives.serialization.pkcs7.pkcs7_decrypt_der`,

:func:`~cryptography.hazmat.primitives.serialization.pkcs7.pkcs7_decrypt_pem`,
and

:func:`~cryptography.hazmat.primitives.serialization.pkcs7.pkcs7_decrypt_smime`.
<p>.. _v43-0-3:<br />
</code></pre></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="f299a48153"><code>f299a48</code></a>
remove deprecated call (<a
href="https://redirect.github.com/pyca/cryptography/issues/12052">#12052</a>)</li>
<li><a
href="439eb0594a"><code>439eb05</code></a>
Bump version for 44.0.0 (<a
href="https://redirect.github.com/pyca/cryptography/issues/12051">#12051</a>)</li>
<li><a
href="2c5ad4d8dc"><code>2c5ad4d</code></a>
chore(deps): bump maturin from 1.7.4 to 1.7.5 in /.github/requirements
(<a
href="https://redirect.github.com/pyca/cryptography/issues/12050">#12050</a>)</li>
<li><a
href="d23968addd"><code>d23968a</code></a>
chore(deps): bump libc from 0.2.165 to 0.2.166 (<a
href="https://redirect.github.com/pyca/cryptography/issues/12049">#12049</a>)</li>
<li><a
href="133c0e02ed"><code>133c0e0</code></a>
Bump x509-limbo and/or wycheproof in CI (<a
href="https://redirect.github.com/pyca/cryptography/issues/12047">#12047</a>)</li>
<li><a
href="f2259d7aa0"><code>f2259d7</code></a>
Bump BoringSSL and/or OpenSSL in CI (<a
href="https://redirect.github.com/pyca/cryptography/issues/12046">#12046</a>)</li>
<li><a
href="e201c870b8"><code>e201c87</code></a>
fixed metadata in changelog (<a
href="https://redirect.github.com/pyca/cryptography/issues/12044">#12044</a>)</li>
<li><a
href="c6104cc366"><code>c6104cc</code></a>
Prohibit Python 3.9.0, 3.9.1 -- they have a bug that causes errors (<a
href="https://redirect.github.com/pyca/cryptography/issues/12045">#12045</a>)</li>
<li><a
href="d6cac753c2"><code>d6cac75</code></a>
Add support for decrypting S/MIME messages (<a
href="https://redirect.github.com/pyca/cryptography/issues/11555">#11555</a>)</li>
<li><a
href="b8e5bfd4d7"><code>b8e5bfd</code></a>
chore(deps): bump libc from 0.2.164 to 0.2.165 (<a
href="https://redirect.github.com/pyca/cryptography/issues/12042">#12042</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/pyca/cryptography/compare/43.0.3...44.0.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=cryptography&package-manager=pip&previous-version=43.0.3&new-version=44.0.0)](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 this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-17 08:46:49 +00:00
Abhimanyu Yadav 569222e9cd
feat(blocks): Add `depends_on` support for input fields (#8852)
- Resolves part of #8731 

### Changes
- Added `depends_on` parameter to SchemaField in `model.py` to specify
field dependencies.
- Updated `useAgentGraph` hook to validate input fields based on their
dependencies, ensuring required fields are set when dependent fields are
filled.
- Modified `BlockIOSubSchemaMeta` to include `depends_on` as an optional
property.



https://github.com/user-attachments/assets/64fd47b3-34dc-48fa-ad90-1c9c5cd4c4a3

---------

Co-authored-by: Zamil Majdy <zamil.majdy@agpt.co>
Co-authored-by: Nicholas Tindle <nicholas.tindle@agpt.co>
2024-12-17 03:20:19 +00:00
Abhimanyu Yadav 2fe6eb1df1
feat(blocks): Add support for mutually exclusive input fields (#8856)
- resolves part of #8731 

### Changes
- Introduced `mutually_exclusive` parameter in `SchemaField` to manage
input exclusivity.
- Implemented logic in `NodeGenericInputField` to disable inputs based
on mutual exclusivity.
- Updated related components to support the new `disabled` state for
inputs.
- Enhanced `BlockIOSubSchemaMeta` to include `mutually_exclusive`
property.

> Currently, I’m disabling the input from the same group (I haven’t
added any frontend validation to prevent users from bypassing it).


https://github.com/user-attachments/assets/71fb9fe4-943b-4724-8acb-6aed2232ed6b

---------

Co-authored-by: Nicholas Tindle <nicholas.tindle@agpt.co>
2024-12-16 23:30:21 +00:00
Nicholas Tindle f588b69484
fix: merge issues from store -> dev (#9016)
<!-- Clearly explain the need for these changes: -->

Monitor page is broken for me
### Changes 🏗️

<!-- Concisely describe all of the changes made in this pull request:
-->

- Updates monitor page to what was in dev before store pr went in
- Updates graph getting endpoint to handle invalid graphs a bit more
graceful

### Checklist 📋

#### For code changes:
- [x] I have clearly listed my changes in the PR description
- [x] I have made a test plan
- [x] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [x] Test to make sure I can start and view my monitor page
2024-12-16 16:46:53 -06:00
Swifty 2de5e3dd83
feat(platform): Agent Store V2 (#8874)
# 🌎 Overview

AutoGPT Store Version 2 expands on the Pre-Store by enhancing agent
discovery, providing richer content presentation, and introducing new
user engagement features. The focus is on creating a visually appealing
and interactive marketplace that allows users to explore and evaluate
agents through images, videos, and detailed descriptions.

### Vision

To create a visually compelling and interactive open-source marketplace
for autonomous AI agents, where users can easily discover, evaluate, and
interact with agents through media-rich listings, ratings, and version
history.

### Objectives

📊 Incorporate visuals (icons, images, videos) into agent listings.
 Introduce a rating system and agent run count.
🔄 Provide version history and update logs from creators.
🔍 Improve user experience with advanced search and filtering features.

### Changes 🏗️

<!-- Concisely describe all of the changes made in this pull request:
-->

### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>

---------

Co-authored-by: Bently <tomnoon9@gmail.com>
Co-authored-by: Aarushi <aarushik93@gmail.com>
2024-12-13 16:35:02 +00:00
Ace 94a312a279
Ollama - Remote hosts (#8234)
### Background

Currently, AutoGPT only supports ollama servers running locally. Often,
this is not the case as the ollama server could be running on a more
suited instance, such as a Jetson board. This PR adds "ollama host" to
the input of all LLM blocks, allowing users to select the ollama host
for the LLM blocks.

### Changes 🏗️

- Changes contained within blocks/llm.py:
    - Adding ollama host input to all LLM blocks
- Fixed incorrect parsing of prompt when passing to ollama in the
StructuredResponse block
    - Used ollama.Client instances to accomplish this.


### Testing 🔍

Tested all LLM blocks with Ollama remote hosts as well as with the
default localhost value.


### Related issues
https://github.com/Significant-Gravitas/AutoGPT/issues/8225

---------

Co-authored-by: Fried-Squid <Fried-Squid>
Co-authored-by: Toran Bruce Richards <toran.richards@gmail.com>
Co-authored-by: Reinier van der Leer <pwuts@agpt.co>
Co-authored-by: Zamil Majdy <zamil.majdy@agpt.co>
Co-authored-by: Aarushi <50577581+aarushik93@users.noreply.github.com>
Co-authored-by: Nicholas Tindle <nicholas.tindle@agpt.co>
Co-authored-by: Nicholas Tindle <nicktindle@outlook.com>
2024-12-13 00:02:49 +00:00
Toran Bruce Richards de3c096e23
feat(blocks): Add CreateDictionaryBlock and CreateListBlock (#8903)
Though this is technically possible with the AddToDictionary and
AddToList Blocks, that approach alone feels like a hidden work-around
rather than an intuitive feature, and I'm happy with the duplication in
the name of better experience for our users here.

Changes 🏗️
Added CreateDictionaryBlock class that creates a dictionary from the
provided key-value pairs.
Added CreateListBlock class that creates a list from the provided
values.


![dictionary](https://github.com/user-attachments/assets/51250715-686b-4428-aa98-eac85d3860fa)

---------

Co-authored-by: Aarushi <50577581+aarushik93@users.noreply.github.com>
Co-authored-by: Nicholas Tindle <nicholas.tindle@agpt.co>
2024-12-12 22:45:15 +00:00
Bently f090f4ca4a
feat(blocks): Add Code extraction Block (#8778)
This adds a code extraction block, this was originally made by
https://github.com/SerchioSD I simply updated it and made it into a PR

### Changes 🏗️

Adds a new ``code_extraction_block.py`` block which has the code


![image](https://github.com/user-attachments/assets/f7e61390-94e1-49e3-b8ee-b2dc7ea03bfe)

### Updated video to show it working with latest mapped aliases


https://github.com/user-attachments/assets/a96aa708-f06f-4a00-a581-9f64d72f9ee8

---------

Co-authored-by: SerchioSD <69461657+serchiosd@users.noreply.github.com>
Co-authored-by: Nicholas Tindle <nicholas.tindle@agpt.co>
Co-authored-by: Nicholas Tindle <nicktindle@outlook.com>
2024-12-12 20:34:21 +00:00
Reinier van der Leer abf73e8d66
fix(backend): Deactivate graph on delete (#8947)
- Resolves #8945

### Changes 🏗️

- Call `on_graph_deactivate` on current active version in `DELETE
/api/graphs/{graph_id}` endpoint
2024-12-11 19:52:07 +00:00
Reinier van der Leer 33b9eef376
refactor(backend): Simplify `CredentialsField` usage + use `ProviderName` globally (#8725)
- Resolves #8931
- Follow-up to #8358

### Changes 🏗️
- Avoid double specifying provider and cred types on `credentials`
inputs
- Move `credentials` sub-schema validation from `CredentialsField` to
`CredentialsMetaInput.validate_credentials_field_schema(..)`, which is
called in `BlockSchema.__pydantic_init_subclass__`
- Use `ProviderName` enum globally
2024-12-11 19:27:09 +00:00
Krzysztof Czerwinski 3fd2b7ce4a
feat(backend): Update schema for PAYG System (#8944)
First step for the PAYG System.

### Changes 🏗️

- Add `stripeCustomerId` to `User` model
- Rename model `UserBlockCredit` to `CreditTransaction`
- Rename model `UserBlockCreditType` to `CreditTransactionType`
- Update related code
- Add a migration

### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>
2024-12-11 16:52:13 +00:00
Zamil Majdy 6490b4e188
chore(platform):Refactor GraphExecution naming clash and remove unused Graph Execution functions (#8939)
This is a follow-up of
https://github.com/Significant-Gravitas/AutoGPT/pull/8752

There are several APIs and functions related to graph execution that are
unused now.
There is also confusion about the name of `GraphExecution` that exists
in graph.py & execution.py.

### Changes 🏗️

* Renamed `GraphExecution` in `execution.py` to `GraphExecutionEntry`,
this is only used as a queue entry for execution.
* Removed unused `get_graph_execution` & `list_executions` in
`execution.py`.
* Removed `with_run` option on `get_graph` function in `graph.py`.
* Removed `GraphMetaWithRuns`
* Removed exposed functions only for testing.
* Removed `executions` fields in Graph model.

### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>

---------

Co-authored-by: Krzysztof Czerwinski <34861343+kcze@users.noreply.github.com>
2024-12-11 15:41:15 +00:00
Krzysztof Czerwinski 6307ca1841
feat(platform): Include all agent versions in Runs in Monitor (#8752)
The graph version is bumped on each save. While the agent version is
changed, the past execution history is gone because the monitor page
only shows the latest version's execution history.

### Changes 🏗️

- Add `get_executions` on the backend that returns all executions of all
graphs for a user
- Display all executions (for all versions) for graphs in Monitor
- Rename ts mirror type `ExecutionMeta` to `GraphExecution` for
consistency with the backend
- Remove redundant `FlowRun` type on the frontend and use
`GraphExecution` instead
- Round execution duration text in Monitor to one decimal place

### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>

---------

Co-authored-by: Zamil Majdy <zamil.majdy@agpt.co>
2024-12-11 01:28:50 +00:00
Zamil Majdy d827d4f9e4
feat(block): Support find all regex extraction for ExtractTextInformationBlock (#8934)
ExtractTextInformationBlock is only supporting extracting one match.

### Changes 🏗️

Adding find_all option to ExtractTextInformationBlock.

### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>
2024-12-10 21:56:06 +00:00
Zamil Majdy 984d42234c
fix(backend): Add missing DB indexes (#8929)
Some table foreign key sources are not properly indexed, causing the
potential full table scan on the code queries.

### Changes 🏗️

Added DB indexes on several tables.

### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>
2024-12-10 10:19:22 +00:00
vishesh10 281cd2910b
fix(backend): Fix Github PR blocks (#8908)
<!-- Clearly explain the need for these changes: -->

### Background

The Github PR blocks are not able to function properly because the
correct endpoint is not getting called.
- Resolves #8667

### Changes 🏗️
* Added logic to derive correct endpoint from the given PR url.
* This logic is implemented in multiple blocks viz.
`GithubReadPullRequestBlock`, `GithubAssignPRReviewerBlock`,
`GithubUnassignPRReviewerBlock`, `GithubListPRReviewersBlock`.

### Test
* Github List PR Reviewers
<img width="511" alt="Screenshot 2024-12-03 at 11 03 59 PM"
src="https://github.com/user-attachments/assets/9c69edcf-c2f4-42d2-954d-0fc4d903ae22">

* Github Read Pull Request (Include Pr Changes checked)
<img width="417" alt="Screenshot 2024-12-06 at 12 01 41 PM"
src="https://github.com/user-attachments/assets/986fada7-7fbb-41b6-a42a-47d1e11fa562">

---------

Co-authored-by: Zamil Majdy <zamil.majdy@agpt.co>
2024-12-09 14:37:02 +00:00
Toran Bruce Richards 1a85eb1dcf
feat(blocks): Add new openrouter models (#8905)
**Summary:**
This PR removes the `GEMINI_FLASH_1_5_EXP` model (due to inference on
OpenRouter not working) and introduces several new models to the
`LlmModel` enum. Corresponding updates have been made to the metadata
configurations and block cost settings to reflect the changes.

**Key Changes:**
1. **Removed Models:**
   - `GEMINI_FLASH_1_5_EXP`

2. **Added New Models:**
   - `QWEN_QWQ_32B_PREVIEW`
   - `NOUSRESEARCH_HERMES_3_LLAMA_3_1_405B`
   - `NOUSRESEARCH_HERMES_3_LLAMA_3_1_70B`
   - `AMAZON_NOVA_LITE_V1`
   - `AMAZON_NOVA_MICRO_V1`
   - `AMAZON_NOVA_PRO_V1`
   - `MICROSOFT_WIZARDLM_2_8X22B`
   - `GRYPHE_MYTHOMAX_L2_13B`

3. **Metadata Updates:**
- Added metadata entries for the new models with a max output tokens of
4,000 tokens.

4. **Cost Configuration Updates:**
   - Defined block costs for the newly added models:
     - `QWEN_QWQ_32B_PREVIEW`: 2 credits
     - All other new models: 1 credit

**Testing:**
- Verified that all models can be called without errors with the AI Text
generator block
2024-12-09 11:49:15 +00:00
Aarushi ea6c9a1152
fix(platform): Stop the start up & shutdown of LaunchDarkly on local envs (#8897)
We aren't using Launch Darkly locally and so it's not set up but it was
still attempting to shut down LaunchDarkly when the app shutdown,
causing errors on shutdown. This PR fixes that issue by entirely
disabling LD on local machines.

### Changes 🏗️

Added a contextmanager to handle LaunchDarkly start up and shutdown
Added a check for local environment in said context manager

### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>
2024-12-06 12:41:48 +00:00
Aarushi dcfad263cb
feat(blocks): Add Exa API Blocks (#8835)
Adding Exa API blocks because it does very cool search and web scrapping

### Changes 🏗️

Adding Exa API blocks: 
Search

Added a new calendar and time input 

Added _auth.py for Exa API too.

### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>

---------

Co-authored-by: Nicholas Tindle <nicholas.tindle@agpt.co>
2024-12-06 10:45:40 +00:00
Zamil Majdy e2904136bd
fix(backend): Make sure all the obtained DB connections are able to query (#8894)
### Changes 🏗️

We've seen some symptoms where during the initial startup of the
application the obtained db connection produces an error when the
network is unreachable. This code made sure that the obtained connection
could run the query and retry it on the spot if it was unable to do so.

### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>
2024-12-06 04:51:25 +00:00
Zamil Majdy 6dba31e021
fix(backend): Enable Jinja SandboxedEnvironment for TextFormatter (#8891)
We still use plain Jinja objects for text formatting in our block codes.

### Changes 🏗️

Introduced a `TextFormatter` utility class that uses jina
SandboxedEnvironment for safer text formatting.

### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>
2024-12-06 04:21:30 +00:00
Zamil Majdy ffc3eff7e2
fix(backend): Add stricter URL validation for block requests (#8890)
We need stricter URL validation for the hostname we can request in the
block code.

### Changes 🏗️

* Canonicalization: Ensures \ are converted to /, adds http:// if
missing, and normalizes the input URL.
* Scheme Check: Only http or https are allowed.
* Hostname Validation:
    - Ensures a hostname exists.
    - Converts it to an IDNA ASCII form to prevent Unicode spoofing.
    - Verifies that the hostname matches a safe DNS pattern.
* Trusted Origins Check: Allows certain hostnames explicitly if needed.
* IP Resolution and Blocking:
    - Resolves the hostname to its IP addresses.
- Checks against a list of private/reserved IP networks to prevent SSRF
to internal services.

### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>
2024-12-06 04:21:24 +00:00
Abhimanyu Yadav 227806aef9
feat(blocks): Add code execution block (#8768)
- Resolves #8766 

Creates a block that executes code in an E2B sandbox.

Demo:


https://github.com/user-attachments/assets/460382c4-5bf7-4f96-a539-88ab263777de

---------

Co-authored-by: Reinier van der Leer <github@pwuts.nl>
Co-authored-by: Reinier van der Leer <pwuts@agpt.co>
2024-12-06 01:16:19 +00:00
Reinier van der Leer 64f5e60d12
feat(blocks): Add webhook block status indicator (#8838)
- Resolves #8743
- Follow-up to #8358

### Demo


https://github.com/user-attachments/assets/f983dfa2-2dc2-4ab0-8373-e768ba17e6f7

### Changes 🏗️

- feat(frontend): Add webhook status indicator on `CustomNode`
   - Add `webhookId` to frontend node data model

- fix(backend): Fix webhook ping endpoint
   - Remove `provider` path parameter
   - Fix return values and error handling
   - Fix `WebhooksManager.trigger_ping(..)`
      - Add `credentials` parameter
      - Fix usage of credentials
   - Fix `.data.integrations.wait_for_webhook_event(..)`
      - Add `AsyncRedisEventBus.wait_for_event(..)`

- feat(frontend): Add `BackendAPIProvider` + `useBackendAPI`

- feat(frontend): Improve layout of node header

    Before:

![image](https://github.com/user-attachments/assets/17a33b94-65f0-4e34-a47d-2dd321edecae)
    After:

![image](https://github.com/user-attachments/assets/64afb1e4-e3f2-4ca9-8961-f1245f25477f)

- refactor(backend): Clean up `.data.integrations`
- refactor(backend): Fix naming in `.data.queue` for understandability

### Checklist 📋

#### For code changes:
- [x] I have clearly listed my changes in the PR description
- [x] I have made a test plan
- [x] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [x] Add webhook block, save -> gray indicator
  - [x] Add necessary info to webhook block, save -> green indicator
  - [x] Remove necessary info, save -> gray indicator

---------

Co-authored-by: Nicholas Tindle <nicholas.tindle@agpt.co>
2024-12-05 10:35:13 +00:00
Nicholas Tindle d4edb9371d
feat(blocks): Add Slant 3D printing via API service (#8805)
<!-- Clearly explain the need for these changes: -->

I want to be able to have agents 3d print things and deliver them to my
house!

### Changes 🏗️

<!-- Concisely describe all of the changes made in this pull request:
-->
- Adds slant3d as a provider
- Adds slant3d order webhook (disabled on the cloud by default due to
how it notifies users)
- Adds several blocks to order from slant3d
- Diables Get Orders (for the same reason as webhook)

### Checklist 📋

#### For code changes:
- [x] I have clearly listed my changes in the PR description
- [x] I have made a test plan
- [x] I have tested my changes according to the test plan

<details>
  <summary>Test Plan</summary>
  
  - [ ] Add filament block and fill API key
  - [ ] Run filament block
- [ ] Add slice block and use this value:
https://files.printables.com/media/prints/1081287/stls/8176524_a9edde2d-68c1-41de-a207-b584fcf42f30_f9127d5b-39ed-4ef8-b59f-d3a0bc874373/rod-holder.stl
  - [ ] Run slice block
- [ ] Add estimate blocks (print and shipping) and use your address, and
the above file
  - [ ] select petg and count 1
  - [ ] run the blocks
  - [ ] Create an order using same information
  - [ ] Run the block and note the order number
  - [ ] Delete the create order block so you don't keep ordering stuff
  - [ ] Run get orders block
  - [ ] Check your order exists
  - [ ] Run the cancel order block with the order id
  - [ ] run the get orders block and check the order no longer exists
</details>

---------

Co-authored-by: Reinier van der Leer <pwuts@agpt.co>
2024-12-04 02:44:29 +00:00
Abhimanyu Yadav 43bd5c89d7
fix(frontend): advanced-toggle-default (#8802)
- resolve #8739

I don't think so that this is a frontend issue [might be wrong] ,
because if we are not classifying that a particular input is `advanced =
true/false`. Then we automatically get `advanced = True`.

<img width="1142" alt="Screenshot 2024-11-27 at 10 36 59 AM"
src="https://github.com/user-attachments/assets/e8d9c037-5b8b-45b2-b40b-8390bc63de99">
2024-12-03 12:14:17 +00:00
Reinier van der Leer 5ccfb8e4c6
dx(backend): Fix linting & formatting for `autogpt_libs` (#8860)
- Resolves #8859
- Follow-up to #8751

### Changes
- Add `autogpt_libs` to the backend CI path filter
- Add `ruff format` step for `autogpt_libs` to `linter.py` and
`pre-commit` config
- Run `poetry run format` with the new setup
2024-12-03 11:34:07 +00:00
Nicholas Tindle 96bba3c1bd
fix: specify encoding for file with emoji in it so it loads on windows (#8873)
<!-- Clearly explain the need for these changes: -->

On windows this file load kept crashing stuff on startup so I specified
the encoding

### Changes 🏗️

<!-- Concisely describe all of the changes made in this pull request:
-->

### Checklist 📋

#### For code changes:
- [x] I have clearly listed my changes in the PR description
- [x] I have made a test plan
- [x] Run the app!
2024-12-03 11:17:34 +00:00
Aarushi de1cd6c295
chore(blocks/fal): Use dict instead of Dict (#8855)
Replace Dict with dict

### Changes 🏗️

Replace Dict with dict

### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>
2024-12-03 11:09:38 +00:00
Bently be7f9123bb
feat(blocks): Add jina fact checker block (#8409)
Co-authored-by: Aarushi <50577581+aarushik93@users.noreply.github.com>
2024-12-02 10:33:36 +00:00
Zamil Majdy 5c49fc87fd
refactor(backend): Apply lint on autogpt_lib folder on backend/linter.py (#8751)
linter.py, only applies in the `backend` module, not `autogpt_libs`.

The scope of this PR is to clear this out.

### Changes 🏗️

* Add a linting scope to both the `backend` & `autogpt_libs` modules,
and apply the linter.


### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>

---------

Co-authored-by: Reinier van der Leer <pwuts@agpt.co>
2024-12-02 09:57:53 +00:00
Zamil Majdy 2121ffd06b chore(platform): Bump version to v0.3.4 2024-12-02 09:08:19 +07:00
Zamil Majdy 0c2940353f hotfix(backend): Fix month credit calculation on December (#8851) 2024-12-02 09:00:01 +07:00
Zamil Majdy d26105d382
hotfix(backend): Fix month credit calculation on December (#8851)
When calculating the next month, we are not rolling the month number
causing an error on credits.

### Changes 🏗️

Add modulo while calculating next month.

### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>
2024-12-02 08:47:40 +07:00
Toran Bruce Richards 4aa5f53710
feat(block): Add AI video generator block with Fal txt 2 vid (#8528)
### Background

Implements an AI Video Generator Block for text to image models hosted
on Fal


![image](https://github.com/user-attachments/assets/9cb70015-4174-4419-8c1a-4144f324442f)

---------

Co-authored-by: Aarushi <50577581+aarushik93@users.noreply.github.com>
Co-authored-by: Aarushi <aarushik93@gmail.com>
2024-11-29 13:04:42 +00:00
Nicholas Tindle 75f9b072a6
refactor(backend): Rename & move `IntegrationCredentialsStore` to backend (#8648)
- Move `autogpt_libs.supabase_integration_credentials_store` into
`backend`
   - `.store` -> `backend.integrations.credentials_store`
   - `.types` -> added to `backend.data.model`
- Rename `SupabaseIntegrationCredentialsStore` to
`IntegrationCredentialsStore`

We wanted to get a few security things in quickly in #8403 and had to
make some compromises to do so. This picks those up and fixes them.

- Resolves #8540

### Checklist 📋

#### For code changes:
- [x] I have clearly listed my changes in the PR description
- [x] I have made a test plan
- [x] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->

---------

Co-authored-by: Reinier van der Leer <pwuts@agpt.co>
Co-authored-by: Aarushi <50577581+aarushik93@users.noreply.github.com>
2024-11-29 11:48:04 +00:00
Zamil Majdy 63af42dafb
fix(backend): Fix conn_retry decorator possible incorrect behaviour on failed async function (#8836)
This fix is triggered by an error observed on db connection failure on
SupaBase:
```
2024-11-28 07:45:24,724 INFO  [DatabaseManager] Starting...
2024-11-28 07:45:24,726 INFO  [PID-18|DatabaseManager|Prisma-7f32369c-6432-4edb-8e71-ef820332b9e4] Acquiring connection started...
2024-11-28 07:45:24,726 INFO  [PID-18|DatabaseManager|Prisma-7f32369c-6432-4edb-8e71-ef820332b9e4] Acquiring connection completed successfully.
{"is_panic":false,"message":"Can't reach database server at `...pooler.supabase.com:5432`\n\nPlease make sure your database server is running at `....pooler.supabase.com:5432`.","meta":{"database_host":"...pooler.supabase.com","database_port":5432},"error_code":"P1001"}
2024-11-28 07:45:35,153 INFO  [PID-18|DatabaseManager|Prisma-7f32369c-6432-4edb-8e71-ef820332b9e4] Acquiring connection failed: Could not connect to the query engine. Retrying now...
2024-11-28 07:45:36,155 INFO  [PID-18|DatabaseManager|Redis-e14a33de-2d81-4536-b48b-a8aa4b1f4766] Acquiring connection started...
2024-11-28 07:45:36,181 INFO  [PID-18|DatabaseManager|Redis-e14a33de-2d81-4536-b48b-a8aa4b1f4766] Acquiring connection completed successfully.
2024-11-28 07:45:36,183 INFO  [PID-18|DatabaseManager|Pyro-2722cd29-4dbd-4cf9-882f-73842658599d] Starting Pyro Service started...
2024-11-28 07:45:36,189 INFO  [DatabaseManager] Connected to Pyro; URI = PYRO:DatabaseManager@0.0.0.0:8005
2024-11-28 07:46:28,241 ERROR  Error in get_user_integrations: All connection attempts failed
```

Where  even 
```
2024-11-28 07:45:35,153 INFO  [PID-18|DatabaseManager|Prisma-7f32369c-6432-4edb-8e71-ef820332b9e4] Acquiring connection failed: Could not connect to the query engine. Retrying now...
```
is present, the Redis connection is still proceeding without waiting for
the retry to complete. This was likely caused by Tenacity not fully
awaiting the DB connection acquisition command.

### Changes 🏗️

* Add special handling for the async function to explicitly await the
function execution result on each retry.
* Explicitly raise exceptions on `db.connect()` if the db is not
connected even after `prisma.connect()` command.

### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>
2024-11-29 09:30:36 +00:00
Aarushi 29f177e70d
feat(blocks): Add Hubspot blocks (#8786)
This PR adds the first few Hubspot blocks so we can create _real_ sales
and marketing agents.

### Changes 🏗️

Added Hubspot blocks; 

- Aded auth for hubspot
- Added Company block
- Added Contact block
- Added Engagement block

### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>
2024-11-29 09:26:43 +00:00
Zamil Majdy eeb5b4aa46
fix(backend): Fix `credentials` cost filter not able to filter the block cost (#8837)
We've started enabling cost based on the *partial value* of the
`credentials` field. And this logic has never been supported.

### Changes 🏗️

* Add partial object matching on the input data filter for evaluating
the block cost.
* Add missing credentials for `ExtractWebsiteContentBlock`
* Removed fallback cost on LLM blocks.

### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>
2024-11-29 08:46:33 +00:00
Aarushi 4b8087c067
feat(platform/featureflags): Setting up feature flagging (#8718)
* feature flag formatting and linting

* add tests

* update poetry lock

* remove unneeded changes

* fix pyproject

* fix formatting and linting

* pydantic settings

* address comments and format

* alphabetize

* fix lockfile

* fix conflicts
2024-11-27 19:29:57 +00:00
dependabot[bot] 97d00455ef
chore(backend): Update 12 dependencies (#8763)
* build(deps): bump the production-dependencies group across 1 directory with 12 updates

Bumps the production-dependencies group with 12 updates in the /autogpt_platform/backend directory:

| Package | From | To |
| --- | --- | --- |
| [aio-pika](https://github.com/mosquito/aio-pika) | `9.4.3` | `9.5.0` |
| [apscheduler](https://github.com/agronholm/apscheduler) | `3.10.4` | `3.11.0` |
| [fastapi](https://github.com/fastapi/fastapi) | `0.115.4` | `0.115.5` |
| [google-api-python-client](https://github.com/googleapis/google-api-python-client) | `2.151.0` | `2.154.0` |
| [groq](https://github.com/groq/groq-python) | `0.11.0` | `0.12.0` |
| [ollama](https://github.com/ollama/ollama-python) | `0.3.3` | `0.4.1` |
| [openai](https://github.com/openai/openai-python) | `1.54.3` | `1.55.1` |
| [pydantic](https://github.com/pydantic/pydantic) | `2.9.2` | `2.10.1` |
| [sentry-sdk](https://github.com/getsentry/sentry-python) | `2.18.0` | `2.19.0` |
| [uvicorn](https://github.com/encode/uvicorn) | `0.32.0` | `0.32.1` |
| [replicate](https://github.com/replicate/replicate-python) | `1.0.3` | `1.0.4` |
| [pinecone](https://github.com/pinecone-io/pinecone-python-client) | `5.3.1` | `5.4.0` |



Updates `aio-pika` from 9.4.3 to 9.5.0
- [Release notes](https://github.com/mosquito/aio-pika/releases)
- [Changelog](https://github.com/mosquito/aio-pika/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mosquito/aio-pika/compare/9.4.3...9.5.0)

Updates `apscheduler` from 3.10.4 to 3.11.0
- [Release notes](https://github.com/agronholm/apscheduler/releases)
- [Changelog](https://github.com/agronholm/apscheduler/blob/3.11.0/docs/versionhistory.rst)
- [Commits](https://github.com/agronholm/apscheduler/compare/3.10.4...3.11.0)

Updates `fastapi` from 0.115.4 to 0.115.5
- [Release notes](https://github.com/fastapi/fastapi/releases)
- [Commits](https://github.com/fastapi/fastapi/compare/0.115.4...0.115.5)

Updates `google-api-python-client` from 2.151.0 to 2.154.0
- [Release notes](https://github.com/googleapis/google-api-python-client/releases)
- [Commits](https://github.com/googleapis/google-api-python-client/compare/v2.151.0...v2.154.0)

Updates `groq` from 0.11.0 to 0.12.0
- [Release notes](https://github.com/groq/groq-python/releases)
- [Changelog](https://github.com/groq/groq-python/blob/main/CHANGELOG.md)
- [Commits](https://github.com/groq/groq-python/compare/v0.11.0...v0.12.0)

Updates `ollama` from 0.3.3 to 0.4.1
- [Release notes](https://github.com/ollama/ollama-python/releases)
- [Commits](https://github.com/ollama/ollama-python/compare/v0.3.3...v0.4.1)

Updates `openai` from 1.54.3 to 1.55.1
- [Release notes](https://github.com/openai/openai-python/releases)
- [Changelog](https://github.com/openai/openai-python/blob/main/CHANGELOG.md)
- [Commits](https://github.com/openai/openai-python/compare/v1.54.3...v1.55.1)

Updates `pydantic` from 2.9.2 to 2.10.1
- [Release notes](https://github.com/pydantic/pydantic/releases)
- [Changelog](https://github.com/pydantic/pydantic/blob/main/HISTORY.md)
- [Commits](https://github.com/pydantic/pydantic/compare/v2.9.2...v2.10.1)

Updates `sentry-sdk` from 2.18.0 to 2.19.0
- [Release notes](https://github.com/getsentry/sentry-python/releases)
- [Changelog](https://github.com/getsentry/sentry-python/blob/master/CHANGELOG.md)
- [Commits](https://github.com/getsentry/sentry-python/compare/2.18.0...2.19.0)

Updates `uvicorn` from 0.32.0 to 0.32.1
- [Release notes](https://github.com/encode/uvicorn/releases)
- [Changelog](https://github.com/encode/uvicorn/blob/master/CHANGELOG.md)
- [Commits](https://github.com/encode/uvicorn/compare/0.32.0...0.32.1)

Updates `replicate` from 1.0.3 to 1.0.4
- [Release notes](https://github.com/replicate/replicate-python/releases)
- [Commits](https://github.com/replicate/replicate-python/compare/1.0.3...1.0.4)

Updates `pinecone` from 5.3.1 to 5.4.0
- [Release notes](https://github.com/pinecone-io/pinecone-python-client/releases)
- [Changelog](https://github.com/pinecone-io/pinecone-python-client/blob/main/CHANGELOG.md)
- [Commits](https://github.com/pinecone-io/pinecone-python-client/compare/v5.3.1...v5.4.0)

---
updated-dependencies:
- dependency-name: aio-pika
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: production-dependencies
- dependency-name: apscheduler
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: production-dependencies
- dependency-name: fastapi
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: production-dependencies
- dependency-name: google-api-python-client
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: production-dependencies
- dependency-name: groq
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: production-dependencies
- dependency-name: ollama
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: production-dependencies
- dependency-name: openai
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: production-dependencies
- dependency-name: pydantic
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: production-dependencies
- dependency-name: sentry-sdk
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: production-dependencies
- dependency-name: uvicorn
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: production-dependencies
- dependency-name: replicate
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: production-dependencies
- dependency-name: pinecone
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: production-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>

* Downgrade pydantic & pinecode

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Zamil Majdy <zamil.majdy@agpt.co>
2024-11-27 16:49:23 +00:00
Zamil Majdy ae9bd87161
fix(backend): Spin-up Database manager on rest.py (#8832) 2024-11-27 16:39:08 +00:00
Nicholas Tindle fd6c1d9f4f
feat(blocks): Various block QoL improvements (#8749)
Co-authored-by: Reinier van der Leer <pwuts@agpt.co>
Co-authored-by: Zamil Majdy <zamil.majdy@agpt.co>
Resolves #8357
Resolves #8738
2024-11-27 16:18:53 +00:00
Bently 4aae15d769
feat(blocks): Add Word Character Count Block (#8781)
* Adds Word Character Count Block

Co-Authored-By: SerchioSD <69461657+serchiosd@users.noreply.github.com>

* update test_output

---------

Co-authored-by: SerchioSD <69461657+serchiosd@users.noreply.github.com>
2024-11-26 21:38:43 +00:00
Abhimanyu Yadav 708ed9a91c
fix(platform): handle None value in issue body when fetching GitHub issues (#8773)
Co-authored-by: Reinier van der Leer <pwuts@agpt.co>
2024-11-26 20:46:13 +00:00
Abhimanyu Yadav 951948d239
fix(platform): allowing condition block to compare 2 strings (#8771)
Co-authored-by: Reinier van der Leer <pwuts@agpt.co>
Co-authored-by: Bently <tomnoon9@gmail.com>
2024-11-26 20:40:51 +00:00
Reinier van der Leer f1414550f9
refactor(platform): Combine per-provider credentials API calls (#8772)
- Add `/integrations/credentials` endpoint which lists all credentials for the authenticated user
- Amend credential fetching logic in front end to fetch all at once instead of per provider

- Resolves #8770
- Resolves (hopefully) #8613
2024-11-26 17:03:06 +00:00
dependabot[bot] 03f776681a
build(deps-dev): bump the development-dependencies group in /autogpt_platform/backend with 2 updates (#8761)
build(deps-dev): bump the development-dependencies group

Bumps the development-dependencies group in /autogpt_platform/backend with 2 updates: [poethepoet](https://github.com/nat-n/poethepoet) and [ruff](https://github.com/astral-sh/ruff).


Updates `poethepoet` from 0.30.0 to 0.31.0
- [Release notes](https://github.com/nat-n/poethepoet/releases)
- [Commits](https://github.com/nat-n/poethepoet/compare/v0.30.0...v0.31.0)

Updates `ruff` from 0.7.4 to 0.8.0
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](https://github.com/astral-sh/ruff/compare/0.7.4...0.8.0)

---
updated-dependencies:
- dependency-name: poethepoet
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: development-dependencies
- dependency-name: ruff
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: development-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-25 22:49:45 +00:00
Reinier van der Leer 3d21d54dab
fix(backend): Add missing `strenum` dependency
Follow-up hotfix for #8358
2024-11-25 18:26:13 +00:00
Reinier van der Leer eef9bbe991
feat(platform, blocks): Webhook-triggered blocks (#8358)
- feat(blocks): Add GitHub Pull Request Trigger block

## feat(platform): Add support for Webhook-triggered blocks
- ⚠️ Add `PLATFORM_BASE_URL` setting

- Add webhook config option and `BlockType.WEBHOOK` to `Block`
  - Add check to `Block.__init__` to enforce type and shape of webhook event filter
  - Add check to `Block.__init__` to enforce `payload` input on webhook blocks
  - Add check to `Block.__init__` to disable webhook blocks if `PLATFORM_BASE_URL` is not set

- Add `Webhook` model + CRUD functions in `backend.data.integrations` to represent webhooks created by our system
  - Add `IntegrationWebhook` to DB schema + reference `AgentGraphNode.webhook_id`
    - Add `set_node_webhook(..)` in `backend.data.graph`

- Add webhook-related endpoints:
  - `POST /integrations/{provider}/webhooks/{webhook_id}/ingress` endpoint, to receive webhook payloads, and for all associated nodes create graph executions
    - Add `Node.is_triggered_by_event_type(..)` helper method
  - `POST /integrations/{provider}/webhooks/{webhook_id}/ping` endpoint, to allow testing a webhook
  - Add `WebhookEvent` + pub/sub functions in `backend.data.integrations`

- Add `backend.integrations.webhooks` module, including:
  - `graph_lifecycle_hooks`, e.g. `on_graph_activate(..)`, to handle corresponding webhook creation etc.
    - Add calls to these hooks in the graph create/update endpoints
  - `BaseWebhooksManager` + `GithubWebhooksManager` to handle creating + registering, removing + deregistering, and retrieving existing webhooks, and validating incoming payloads

## Other improvements
- fix(blocks): Allow having an input and output pin with the same name
- fix(blocks): Add tooltip with description in places where block inputs are rendered without `NodeHandle`
- feat(blocks): Allow hiding inputs (e.g. `payload`) with `SchemaField(hidden=True)`
- fix(frontend): Fix `MultiSelector` component styling
- feat(frontend): Add `AlertDialog` UI component
- feat(frontend): Add `NodeMultiSelectInput` component
- feat(backend/data): Add `NodeModel` with `graph_id`, `graph_version`; `GraphModel` with `user_id`
  - Add `make_graph_model(..)` helper function in `backend.data.graph`
- refactor(backend/data): Make `RedisEventQueue` generic and move to `backend.data.execution`
- refactor(frontend): Deduplicate & clean up code for different block types in `generateInputHandles(..)` in `CustomNode`
- dx(backend): Add `MissingConfigError`, `NeedConfirmation` exception

---------

Co-authored-by: Zamil Majdy <zamil.majdy@agpt.co>
2024-11-25 18:42:36 +01:00
Zamil Majdy f00654cb2c
fix(backend): Fix .env file read contention on pyro connection setup (#8736) 2024-11-25 16:55:52 +07:00
Reinier van der Leer f2816f98e9
Merge branch 'master' into dev 2024-11-21 18:06:08 +00:00
Zamil Majdy 8b4bb27077
fix(backend): Re-work the connection input consumption logic for Agent Executor Block (#8710) 2024-11-21 11:05:41 +00:00
Zamil Majdy 6954f4eb0e
fix(backend): Revert non-async routes that are changed to async (#8734) 2024-11-21 11:46:55 +01:00
Zamil Majdy c14ab0c37a
refactor(backend): Remove un-needed join in `fix_llm_provider_credentials` query (#8728) 2024-11-21 09:35:17 +00:00
Reinier van der Leer 13da8af170
chore(platform): Bump version to v0.3.3 2024-11-20 23:25:14 +00:00
Nicholas Tindle 26a6bd4d10
docs(platform): update docs for security ssrf (#8675) 2024-11-20 15:29:45 +00:00
Swifty d84ddfcf1a
fix(block): Updated model_version to prevent conflicts with pydantic naming (#8729)
changed model_version name to avoid conflicts
2024-11-20 12:51:06 +00:00
Reinier van der Leer 33dd2eb919
dx(backend): Fix `pre-commit` `isort` step (#8726)
- Set `tool.isort.profile = "black"`
- Explicitly pass the first-party package name in the `isort` jobs in the `pre-commit` config
2024-11-19 19:51:20 -06:00
Aarushi a5734a57d5
fix(platform): Remove settings endpoint (#8715)
remove settings endpoint
2024-11-19 23:39:40 +00:00
Zamil Majdy 274419d393
fix(backend): Improve typing for blocks StepThroughItemsBlock, CountdownTimerBlock, AddToListBlock, AddToDictionaryBlock (#8713) 2024-11-19 20:53:34 +00:00
dependabot[bot] 84076ebee1
build(deps-dev): bump the development-dependencies group in /autogpt_platform/backend with 2 updates (#8699)
build(deps-dev): bump the development-dependencies group

Bumps the development-dependencies group in /autogpt_platform/backend with 2 updates: [ruff](https://github.com/astral-sh/ruff) and [pyright](https://github.com/RobertCraigie/pyright-python).


Updates `ruff` from 0.7.3 to 0.7.4
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](https://github.com/astral-sh/ruff/compare/0.7.3...0.7.4)

Updates `pyright` from 1.1.388 to 1.1.389
- [Release notes](https://github.com/RobertCraigie/pyright-python/releases)
- [Commits](https://github.com/RobertCraigie/pyright-python/compare/v1.1.388...v1.1.389)

---
updated-dependencies:
- dependency-name: ruff
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: development-dependencies
- dependency-name: pyright
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: development-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-19 13:28:34 +00:00
Aarushi 8fccf2eed3
fix(platform/builder): Add heartbeat mechanism (#8665)
* add heartbeat mechanism

* formatting data

* import List

* another import fix

* wip

* formatting adn linting
2024-11-18 16:33:15 +00:00
Toran Bruce Richards 29cff1bb4e
feat(blocks): Add Open Router integration with a large selection of new models (#8653)
* feat: Add Open Router integration credentials

- Added support for Open Router integration credentials in the Supabase integration credentials store.
- Updated the LLM provider field to include "open_router" as a valid provider option.
- Added Open Router API key field to the backend settings.
- Updated the profile page to display the Open Router integration credentials.
- Updated the credentials input and provider components to include Open Router as a provider option.
- Updated the autogpt-server-api types to include "open_router" as a provider name.
- Updated the LLM provider schema to include "open_router" as a valid provider name.

- Added GEMINI_FLASH_1_5_8B as the first Open Router LLM

* Add type ignore to new llm prompt to match the rest of them.

* Update LlmModel with a selection of new OpenRouter models

* format
2024-11-18 14:03:50 +00:00
Zamil Majdy 6fa4b8cb11
fix(backend): Add the lower cap of the user credits to zero (#8682)
fix(backend): Add lower cap of the user credits to zero
2024-11-18 13:12:42 +00:00
Zamil Majdy f36d95aaa8
fix(backend): Avoid falling back to default user unless ENABLED_AUTH is set to False (#8691) 2024-11-18 13:01:21 +00:00
Reinier van der Leer e840106949
fix(backend): Resolve Pydantic warning about missing `secrets_dir` (#8692)
- Remove `secrets_dir` and other references to `get_secrets_path()`
- Remove unused `get_config_path()`

Follow-up to #8521, which removed the `secrets` dir but not the references to it.
2024-11-18 12:41:18 +00:00
Reinier van der Leer 6c109adf0b
Merge branch 'master' into dev 2024-11-18 12:32:24 +00:00
Reinier van der Leer bff0dc3d82
chore(platform): Bump version to v0.3.1 2024-11-18 12:11:07 +01:00
Reinier van der Leer 918538147c
fix(backend): Add migrations to fix credentials inputs with invalid provider "llm" (#8674)
In #8524, the "llm" credentials provider was replaced. There are still entries with `"provider": "llm"` in the system though, and those break if not migrated.

- SQL migration to fix the obvious ones where we know the provider from `credentials.id`
- Non-SQL migration to fix the rest
2024-11-16 01:07:05 +01:00
Reinier van der Leer 1e8a272ac6
fix(backend): Add migrations to fix credentials inputs with invalid provider "llm" (vol. 5)
Five times the charm
2024-11-16 00:41:56 +01:00
Reinier van der Leer 1c6890486f
fix(backend): Add migrations to fix credentials inputs with invalid provider "llm" (vol. 4)
Another attempt at unbreaking this raw Prisma query
2024-11-16 00:17:43 +01:00
Reinier van der Leer 29688758c4
fix(backend): Add migrations to fix credentials inputs with invalid provider "llm" (vol. 3)
Fix User table reference in raw SQL queryin non-Prisma migration
2024-11-15 20:56:04 +01:00
Reinier van der Leer 2a66295a92
fix(backend): Add migrations to fix credentials inputs with invalid provider "llm" (vol. 2)
Fix breaking SQL double-casting issue in the SQL migration
2024-11-15 20:32:24 +01:00
Reinier van der Leer 4db8e746d7
fix(backend): Add migrations to fix credentials inputs with invalid provider "llm"(#8674)
In #8524, the "llm" credentials provider was replaced. There are still entries with 	"provider": "llm"	 in the system though, and those break if not migrated.

- SQL migration to fix the obvious ones where we know the provider from `credentials.id`
- Non-SQL migration to fix the rest
2024-11-15 20:18:02 +01:00
Reinier van der Leer 0551bec096
Merge branch 'master' into dev 2024-11-15 15:17:45 +01:00
Reinier van der Leer 9a4ff9023d
bump version to v0.3.0 2024-11-15 11:54:42 +01:00
Zamil Majdy 8987fdd48c
feat(backend): Enable json parsing with typing & conversion (#8578) 2024-11-15 17:28:59 +07:00
Zamil Majdy 6a1cea4c4e
fix(backend): Add execution persistence for execution scheduler service (#8649)
* fix(backend): Add execution persistence for execution scheduler service

* scheduler REST API cleanup

* Fix to binary

* Adapt UI with new API

* Remove schedule.py

* Remove unused class

* Fix linting
2024-11-15 11:17:37 +01:00
Reinier van der Leer f9633ffb71
Revert "fix(platform): Remove migrate and encrypt function" (#8654)
Reverts c707ee9 (#8646)

The problem analysis that led to #8646 contained some errors, so the migration removed in the PR doesn't seem to have been the cause of the problem we were hunting. Also, this migration is an essential part of the security improvement that we made 2 weeks ago.
2024-11-14 23:34:30 +00:00
Abhimanyu Yadav dd0081ab35
feat(platform) : scheduling agent runner (#8634)
* add: ui for scheduling agent

* adding requests and type for schedule endpoints

* feat : monitor schdules on monitor page

* add: Complete monitor page

* fix filter on monitor page

* fix linting

* PR nits

* Added Docker Compose env var

---------

Co-authored-by: Toran Bruce Richards <toran.richards@gmail.com>
Co-authored-by: Swifty <craigswift13@gmail.com>
Co-authored-by: Zamil Majdy <zamil.majdy@agpt.co>
2024-11-14 16:18:56 +01:00
Abhimanyu Yadav bbbdb5665b
feat(platform): Add api generator functions and endpoints (#8597)
* add: api generator functions and endpoints

* Rebase onto dev, refactor API manager location, remove suspended key revoke, and update API code for Prisma compatibility

* add: key_manager

* reversing changes og poetry.lock

* add: changing hash mexhansim in API Manager

* add: changing hash mexhansim in API Manager

* fixing some simple bugs

* fix linting and adding better error handling

---------

Co-authored-by: Aarushi <50577581+aarushik93@users.noreply.github.com>
2024-11-14 14:33:27 +00:00
Toran Bruce Richards e628a25533
feat(blocks): Add `AIImageGeneratorBlock` (#8525)
* feat(block): Add AIImageGeneratorBlock

This commit adds the AIImageGeneratorBlock class to the backend. The AIImageGeneratorBlock is responsible for generating images using various AI models through a unified interface.

* Remove unsupported inputs and add more styles

* Update autogpt_platform/backend/backend/blocks/ai_image_generator_block.py

Co-authored-by: Reinier van der Leer <pwuts@agpt.co>

* run format

* Add test mock

* mock client run

* Refactor AIImageGeneratorBlock to use a separate function for running the client

* Update Credential description

* Rename ModelProvider to ImageGenModel

* Add missing block run function

* fix mock

* .

* Refactor AIImageGeneratorBlock to move run_client function inside class

* Fix broken reference to run client and tidy code.

* Refactor AIImageGeneratorBlock to improve code structure and error handling

* Move client into run client instantiation function.

* Refactor AIImageGeneratorBlock to handle output as FileOutput and improve error handling

* run format

---------

Co-authored-by: Reinier van der Leer <pwuts@agpt.co>
2024-11-14 12:28:24 +00:00
vishesh10 639242ac68
Add provision for other languages in Youtube Video Block (#8630)
Co-authored-by: Toran Bruce Richards <toran.richards@gmail.com>
2024-11-14 09:20:46 +00:00
Aarushi c707ee9cb6
fix(platform): Remove migrate and encrypt function (#8646)
remove migrate and encrypt function
2024-11-13 23:09:26 +00:00
Toran Bruce Richards aafc101224
tweak(backend): Update all block costs (#8639)
* Add support for default credentials to unreal block

* Refactor block cost configuration and add new blocks

This commit refactors the block cost configuration file and adds support for new blocks. The changes include:
- Importing the `AIMusicGeneratorBlock`, `JinaEmbeddingBlock`, and `UnrealTextToSpeechBlock` classes
- Updating the `BLOCK_COSTS` dictionary to include costs for the new blocks

These changes enable the usage of the newly introduced blocks.
2024-11-13 16:05:32 +00:00
Reinier van der Leer aaa0b79f08
fix(frontend): Unbreak credentials input on single-provider blocks (#8636)
- Resolves #8635

- fix(frontend): Fix type mismatch of `CredentialsField` schema between frontend and backend
   - Fix usages of `credentialsSchema.credentials_provider`

- refactor(backend): Create `CredentialsFieldSchemaExtra` model in backend so it can be mirrored directly in frontend
   - Add check to enforce multi-provider `CredentialsField` always has `discriminator`

- dx: Add type checking shortcut `yarn type-check` / `npm run type-check` for frontend
2024-11-13 13:48:15 +00:00
Krzysztof Czerwinski e907ffda6e
feat(platform): Simplify Credentials UX (#8524)
- Change `provider` of default credentials to actual provider names (e.g. `anthropic`), remove `llm` provider
- Add `discriminator` and `discriminator_mapping` to `CredentialsField` that allows to filter credentials input to only allow  providers for matching models in `useCredentials` hook (thanks @ntindle for the idea!); e.g. user chooses `GPT4_TURBO` so then only OpenAI credentials are allowed
- Choose credentials automatically and hide credentials input on the node completely if there's only one possible option
- Move `getValue` and `parseKeys` to utils
- Add `ANTHROPIC`, `GROQ` and `OLLAMA` to providers in frontend `types.ts`
- Add `hidden` field to credentials that is used for default system keys to hide them in user profile
- Now `provider` field in `CredentialsField` can accept multiple providers as a list

-----------------
Co-authored-by: Nicholas Tindle <nicholas.tindle@agpt.co>
Co-authored-by: Reinier van der Leer <pwuts@agpt.co>
2024-11-12 16:55:48 +01:00
Zamil Majdy ef7e50403e
refactor(backend): Centralize Block Cost into a Single File (#8623) 2024-11-12 14:09:59 +00:00
Zamil Majdy 1e872406ca
feat(platform): Introduced Agent Execution Block (#8533) 2024-11-12 13:03:15 +07:00
dependabot[bot] 4a163e5b54
build(deps-dev): bump the development-dependencies group in /autogpt_platform/backend with 3 updates (#8611)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Nicholas Tindle <nicholas.tindle@agpt.co>
2024-11-11 17:31:13 -06:00
dependabot[bot] 603fec3467
build(deps): bump the production-dependencies group in /autogpt_platform/backend with 2 updates (#8610)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Nicholas Tindle <nicholas.tindle@agpt.co>
2024-11-11 22:21:44 +00:00
Nicholas Tindle 3c0dea0017
[Snyk] Security upgrade python from 3.11-slim-buster to 3.11.10-slim-bookworm (#8619)
fix: autogpt_platform/backend/Dockerfile to reduce vulnerabilities

The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-DEBIAN10-GNUTLS28-6159414
- https://snyk.io/vuln/SNYK-DEBIAN10-NCURSES-1655739
- https://snyk.io/vuln/SNYK-DEBIAN10-NCURSES-1655739
- https://snyk.io/vuln/SNYK-DEBIAN10-NCURSES-5421196
- https://snyk.io/vuln/SNYK-DEBIAN10-NCURSES-5421196

Co-authored-by: snyk-bot <snyk-bot@snyk.io>
2024-11-11 20:33:39 +00:00
Toran Bruce Richards 1f0cbc6500
feat(block): Add AI Music Generator Block with Meta Music Gen (#8532)
* feat(platform): Add AIMusicGeneratorBlock for music generation

* refactor(platform): Refactor AIMusicGeneratorBlock for improved error handling and logging

* refactor(ui): Refactor ContentRenderer to support audio rendering

* format

* Frontend format and lint
2024-11-11 09:36:39 -08:00
Aarushi e6e47373ac
feat(blocks/jina): Add default credentials for Jina (#8603)
add jina defaults
2024-11-10 17:18:53 +00:00
Aarushi 359ae8307a
feat(backend): Add API key DB table (#8593)
* add api key db tables

* remove uniqueness constraint on prefix

* add postfix
2024-11-08 17:48:37 +00:00