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
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.
* 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>
* 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>
- 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
- 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`
### 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.
- 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()`
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.
* 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
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
- Add prefix `/api` to `APIRouter` in server.py
- Update API client in Builder
- Update default `AGPT_SERVER_URL` in .env.template
- Update default `baseUrl` in `AutoGPTServerAPI` constructor
* Add minimal implementation of `LlamafileProvider`, a new `ChatModelProvider` for llamafiles. It extends `BaseOpenAIProvider` and only overrides methods that are necessary to get the system to work at a basic level.
* Add support for `mistral-7b-instruct-v0.2`. This is the only model currently supported by `LlamafileProvider` because this is the only model I tested anything with.
* Add instructions to use AutoGPT with llamafile in the docs at `autogpt/setup/index.md`
* Add helper script to get it running quickly at `scripts/llamafile/serve.py`
---------
Co-authored-by: Reinier van der Leer <pwuts@agpt.co>