Commit Graph

5542 Commits

Author SHA1 Message Date
Reinier van der Leer
7e0b1156cc feat(agent): Improve history format for code flow execution results 2024-07-23 23:15:50 +02:00
Reinier van der Leer
da9360fdeb feat(agent/api): Pretty-print execute_code_flow proposal in Agent Protocol output 2024-07-23 22:55:16 +02:00
Reinier van der Leer
9dea6a273e Merge branch 'master' into zamilmajdy/code-validation 2024-07-23 22:42:32 +02:00
Reinier van der Leer
e7885f943b fix(agent): Unbreak LLM status check on start-up
Fixes #7508

- Amend `app/configurator.py:check_model(..)` to check multiple models at once and save duplicate API calls
- Amend `MultiProvider.get_available_providers()` to verify availability by fetching models and handle failure
2024-07-23 22:36:04 +02:00
Reinier van der Leer
e19636ac3e feat(agent/cli): Pretty-print code flow proposal
- Amend `main.py:update_user(..)` to improve displaying of existing + new prompt strategy output
- Replace `"execute_code_flow"` literals with references to the command definition
2024-07-23 22:18:54 +02:00
Reinier van der Leer
f03c6546b8 Merge branch 'master' into zamilmajdy/code-validation 2024-07-23 20:38:30 +02:00
Aarushi
aca7165694 feat(rnd) Fix linting and formatting (#7568)
fix linting and formatting
2024-07-23 18:25:04 +01:00
Toran Bruce Richards
22b223037e feat(Blocks): Add support for new Llama 3.1 models with Groq! (#7567)
feat: Add support for new Groq models

The commit adds support for new Groq models, including LLAMA3_1_405B, LLAMA3_1_70B, and LLAMA3_1_8B. These models are part of the preview release and offer enhanced reasoning and versatility capabilities.
2024-07-23 16:48:39 +01:00
Toran Bruce Richards
6747ae1559 feat(Blocks): Add Blocks Providing Basic Arithmetic Operations (#7529)
* feat(blocks): Add MathsBlock for performing mathematical operations

The commit adds a new block called MathsBlock to perform various mathematical operations such as addition, subtraction, multiplication, division, and exponentiation. The block takes input parameters for the operation type, two numbers, and an option to round the result. It returns the result of the calculation along with an explanation of the performed operation.

---------

Co-authored-by: Swifty <craigswift13@gmail.com>
2024-07-23 16:28:59 +02:00
Aarushi
39afba6da8 feat(ci) Fix migrations in CI (#7563)
* update CI

* add poetry run

* schema prisma
2024-07-23 14:01:45 +01:00
Toran Bruce Richards
a00df25092 feat(Blocks): Add RSS Reader Block for reading RSS feeds (#7533)
* feat: Add RSSReaderBlock for reading RSS feeds

The commit adds a new `RSSReaderBlock` class in the `rss-reader-block.py` file. This block allows users to read RSS feeds by providing the URL of the feed, start datetime, polling rate, and a flag to run the block continuously. The block fetches the feed using the `feedparser` library and returns the title, link, description, publication date, author, and categories of each RSS item.

This commit also includes the addition of the `feedparser` dependency in the `pyproject.toml` file.

* fix(server): update lock file

* updated poetry lock

* fixed rss reader testing

* Updated error message in test to include check info

* Set starttime as 1 day ago

* Changed start time to time period

---------

Co-authored-by: Swifty <craigswift13@gmail.com>
2024-07-23 13:15:14 +02:00
Toran Bruce Richards
ea698ab0fe feat(Blocks): Add For-Each Block for iterating over a List. (#7531)
* feat: Add ForEachBlock for iterating over a List.

---------

Co-authored-by: Swifty <craigswift13@gmail.com>
2024-07-23 11:40:41 +02:00
Krzysztof Czerwinski
902d2a8924 feat(builder): UX and style updates (#7550)
- Handles:
  - Add `NodeHandle` to draw input and output handles
  - Position handles relatively
  - Make entire handle label clickable/connectable
  - Add input/output types below labels
  - Change color on hover and when connected
  - "Connected" no longer shows up when connected
- Edges:
  - Draw edge above node when connecting to the same node
  - Add custom `ConnectionLine`; drawn when making a connection
  - Add `CustomEdge`; drawn for existing connections
  - Add arrow to the edge end
  - Colorize depending on type
- Input field modal:
  - Select all text when opened
  - Disable node dragging
- CSS:
  - Remove not needed styling
  - Use tailwind classes instead of css for some components
  - Minor style changes
- Add shadcn switch
- Change bottom node buttons (for properties and advanced) to switches
- Format code
2024-07-23 09:36:42 +01:00
Reinier van der Leer
ab0df04bfe fix(builder/monitor): Fix Graph export (#7556)
- fix(builder/monitor): Export `Graph` rather than `GraphMeta`
  - Fixes #7557

- refactor(builder): Split up `lib/autogpt_server_api` into multi-file module
  - Resolves #7555
  - Rename `lib/autogpt_server_api` to `lib/autogpt-server-api`
  - Split up `lib/autogpt-server-api` into `/client`, `/types`
  - Move `ObjectSchema` from `lib/types` to `lib/autogpt-server-api/types`
  - Make definition of `Node['metadata']['position']` independent of `reactflow.XYPosition`

- fix(builder/monitor): Strip secrets from graph on export
  - Resolves #7492
  - Add `safeCopyGraph` function in `lib/autogpt-server-api/utils`
  - Use `safeCopyGraph` to strip secrets from graph on export in `/monitor` > `FlowInfo`
2024-07-23 09:28:06 +02:00
Zamil Majdy
d407fd101e fix(rnd): Make Agent Server's pin connections become the mandatory source of input (#7539)
### Background

Input from the input pin is consumed only once, and the default input can always be used. So when you have an input pin overriding the default input, the value will be used only once and the following run will always fall back to the default input. This can mislead the user.

Expected behaviour: the node should NOT RUN, making connected pins only use their connection(s) for sources of data.

### Changes 🏗️

* Make pin connection the mandatory source of input and not falling back to default value.
* Fix the type flakiness on block input & output. Unify the typing for BlockInput & BlockOutput using the right alias to avoid wrong typing.
* Add comment on alias
* automated test on the new behaviour.
2024-07-23 09:06:26 +07:00
Aarushi
a911f9a5eb feat(rnd) Add Postgres support (#7513)
* replace SQLite with Postgres

* make sqlite default

* add migrations for sqlite and postgres

* update readme

* fix formatting
2024-07-22 23:43:49 +01:00
Reinier van der Leer
470c738732 fix(builder/monitor): Fix # of runs count on first load (#7558)
Return mutated copy rather than in-place mutated `flowRuns` in `refreshFlowRuns(..)`

Fixes #7507
2024-07-22 23:15:54 +01:00
Nicholas Tindle
7de49dfbe5 Update workflow-checker.yml (#7553) 2024-07-22 13:49:27 -05:00
Reinier van der Leer
a02b017cea feat(builder): Built-in templates (#7511)
- Add "Medium Blogger" template to `graph_templates` folder
- Add `import_packaged_templates()` function in `data.graph`
- Call `import_packaged_templates()` in `AgentServer` lifecycle setup
- Fix `util.json:loads` typing and parameter forwarding
2024-07-22 17:54:48 +02:00
Nicholas Tindle
56b82369b6 ci(all): verify the workflows as part of each run (#7500) 2024-07-22 07:23:48 -05:00
Tyrion Lannister
a7926584ca Fix(rnd): Add Prerequisites Documentation in README.md (Server) (#7546) 2024-07-22 07:19:20 -05:00
Nicholas Tindle
6ffa644fb6 fix(ops/issues): update template for bugs (#7211) 2024-07-22 07:16:51 -05:00
Bently
a82317e2ac feat(builder): fix sidebar scroll issue (#7548)
fix sidebar scroll issue
2024-07-22 13:05:50 +01:00
Bently
fd000a4173 feat(Builder): Fix sidebar covering navbar (#7544)
Fix sidebar covering flow
2024-07-22 10:11:46 +01:00
Nicholas Tindle
235715e054 feat(server): read_csv block (#7499) 2024-07-22 09:58:02 +02:00
Nicholas Tindle
d0ec31b698 docs: fix dead links (#7470) 2024-07-22 09:56:32 +02:00
Zamil Majdy
fa1b486c64 feat(rnd): Add Agent block UUID validation for Agent Server (#7501)
Co-authored-by: Nicholas Tindle <nicholas.tindle@agpt.co>
2024-07-20 09:14:18 +07:00
Reinier van der Leer
21084c5817 feat(builder, server): Speed up fetching graphs (#7477)
- Let `GET /graphs` return `GraphMeta[]` instead of `string[]` (list of IDs)
- Rename `AutoGPTServerAPI` method `listGraphIDs` -> `listGraphs` and adjust return type
   - Replace all usages of `Graph` with `GraphMeta` in `/monitor`
- Delete `data.graph:get_graph_ids()`
2024-07-19 18:28:59 -05:00
Zamil Majdy
82fd3166ef feat(rnd): Add block description and categories (#7463)
### Background

Add block description and categories metadata.

### Changes 🏗️

* Add block description and categories metadata.
* Initialize description and categories on the existing blocks.
2024-07-19 11:10:16 -05:00
Toran Bruce Richards
f833fa3624 feat: Update CreateMediumPostBlock to use secret value for author_id
This commit updates the `CreateMediumPostBlock` class in `create_medium_post.py` to use the secret value for the `author_id` parameter. Previously, it was using the plain value, which caused the value to be sent incorrectly to the API.
2024-07-19 14:52:02 +01:00
Aarushi
e6f9870f2e feat(blocks) Add ollama integration (#7505)
* add ollama integration

* address review comments & formatting
2024-07-19 11:27:48 +01:00
Bently
6e319a6881 Feat(Builder): Decrease the delay before a tooltip opens (#7478)
Make tooltip show in 10 ms
2024-07-19 09:21:34 +01:00
Nicholas Tindle
64edf12c31 fix(server): code.py as a filename overshadows an internal python file (#7496) 2024-07-19 10:30:54 +07:00
Nicholas Tindle
e1795b8216 fix(server): add create medium post test missing params (#7497) 2024-07-19 10:28:43 +07:00
Nicholas Tindle
057d0848ef fix(server): various linting errors (#7498) 2024-07-19 10:28:21 +07:00
Bently
2dc673614f feat(doc): Update node creation docs (#7462)
* feat(doc): Update node creation docs

* small fixes

* fix formatting

* remove mention of registering a block

* Update docs/content/server/new_blocks.md

Co-authored-by: Nicholas Tindle <nicholas.tindle@agpt.co>

---------

Co-authored-by: Nicholas Tindle <nicholas.tindle@agpt.co>
2024-07-18 20:01:40 -05:00
Toran Bruce Richards
24e08d57ef Update README.md 2024-07-19 00:46:17 +01:00
Toran Bruce Richards
bd540b5cc4 tweak(builder): Replace erroneous mentions of "Properties" to "Output" (#7489) 2024-07-19 00:42:22 +01:00
Toran Bruce Richards
6d192429a6 feat(blocks): Add Medium Post block (#7494)
* feat: Add CreateMediumPostBlock to create Medium posts

* feat: Add medium_api_key to Secrets class in settings.py

* feat: Update medium post block to work with latest system.

* feat: Add medium_author_id field to Secrets class in settings.py

* run isort

* run black
2024-07-19 00:26:32 +01:00
Toran Bruce Richards
314a24ab8f fix(blocks): resolve duplicate ID in ObjectLookupBlock - basic.py 2024-07-18 23:58:19 +01:00
Toran Bruce Richards
ff962d8d88 Merge branch 'master' of https://github.com/Significant-Gravitas/AutoGPT 2024-07-18 23:56:09 +01:00
Toran Bruce Richards
5e5182e236 feat: Add CreateMediumPostBlock to create Medium posts 2024-07-18 22:54:13 +01:00
Nicholas Tindle
04dcd230cd feat(builder): allow deletion of nodes and edges via del key (#7483) 2024-07-18 22:45:28 +01:00
Nicholas Tindle
c8b46109fe feat(builder, server): hide secrets from the UI and mark them as secrets in the api (#7490)
* feat(server): add json_extra marking some fields as secret

* devx(builder): add a launch.json for debugging

* feat(builder): hide secret strings

---------

Co-authored-by: Toran Bruce Richards <toran.richards@gmail.com>
2024-07-18 16:30:11 -05:00
Toran Bruce Richards
c00caa4bcf tweak(Builder): Remove unnecessary node output heading in CustomNode component (#7487)
feat: Remove unnecessary node output heading in CustomNode component
2024-07-18 21:43:47 +01:00
Bently
e382dcf823 feat(blocks): Adds node to get weather from openweathermap (#7382)
* Add node for openweathermap

* fix naming

* Rename GetOpenweatherMapWeather.py to getopenweathermapweather.py

* fix naming

* fix conflicts

* fix conflicts

* Updates to node + moved to search.py

* small cleanup
2024-07-18 21:36:09 +01:00
Toran Bruce Richards
27e6c3a95d feat(block): Add support for GPT-4O Mini model in LLM block (#7480)
feat: Add support for GPT-4O Mini model in LLM block
2024-07-18 19:02:36 +01:00
Bently
aaf650ee23 feat(builder): Fix message covering navbar on < lg screen size (#7474)
* Remove excess styling from message box
* Replace "node" with "block" in message (-> "Get started by adding a block")
2024-07-18 16:46:28 +02:00
Reinier van der Leer
4c003d6e20 fix(builder): Make detail view on /monitor obey grid
Unwrap the detail view element and style it directly instead
2024-07-18 04:12:51 +02:00
Reinier van der Leer
8264d7bf5a feat(builder): Importing/exporting Agents and Templates (#7466)
Builder:
* Add download button to agent info view
   - Add download button to `FlowInfo`
   - Add `exportAsJSONFile(..)` function to lib/utils.ts

* Add Create button + menu to /monitor page
   - Add "Create | v" split button to Agent list
   - Add list of templates to Create menu
   - Add "Import from file" option + dialog
      - Create `AgentImportForm` component
         - Install `Form`, `Label`, `Switch` components from shad/cn UI
      - Install `Dialog` component from shad/cn

* Support saving/editing Templates
   - Add `templateID` query parameter to `/build`
   - Use `templateID` query parameter in `AgentImportForm` redirect if imported as template
   - Make `FlowEditor` suitable for saving/editing templates
      - Add `template` (boolean) parameter to `FlowEditor` component
      - Add conditions to all `createGraph` or `updateGraph` calls, to use `createTemplate`/`updateTemplate` if applicable
      - Add "Save as Template" button, visible if the graph is new (unsaved)
      - Hide "Save & Run Agent" button when editing a template

* Add template endpoints to `AutoGPTServerAPI` client
   - Add `listTemplates()`
   - Add `getTemplate(id, version?)`
   - Add `getTemplateAllVersions(id)`
   - Add `createTemplate(templateCreateBody)`
   - Add `updateTemplate(id, template)`

* fix inner alignment of `<Input type="file">` elements

Server:
* fix(server): Fix return of `create_graph` for templates
2024-07-18 13:19:56 +01:00