- 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>
### Background
Add formatter & linter command.
Tools: ruff --> isort --> black --> pyright.
### Changes 🏗️
Introduced:
* `poetry run format`
* `poetry run lint`
`poetry run lint` will be executed on CI.
- Renamed `Schema` to `BlockSchema` and moved to `lib/types.ts`
- Add `SchemaTooltip` component that renders markdown tooltip for node fields
- Add `SecretField` function (which uses `BlockSecret` as value) that replaces `BlockFieldSecret` functionality for models
- Rename `get` to `get_secret_value` to make name clearer and inline with pydantic `Secret` types
- Add shadcn tooltip
- Add `react-markdown` dependency
- Add `SchemaField` that works like Pydantic `Field` but allows to add extra json schema values. This PR adds `placeholder` entry but it could be extended with other data.
- Render `placeholder` inside input fields if available.
- Restyle placeholders so they are visually distinct from user-entered values
### Background
The main scope of this change is enhancing the system capability (by fixing bug, correcting execution behaviour) to allow for creating a graph with a loop, to allow the use case of block auto-generation agent.
### Changes 🏗️
* Main changes: Add block_autogen.py (block auto-generation agent graph example).
* Refactor on test boilerplate: introduced `util/test` for initiating a server, and waiting graph execution.
* Removing unnecessary db lookup and duplicated codes used for sending execution updates on agent executor.
* Removed redundant code on test and cli code.
* Moved block test execution helper into the main code (so blockinstallerblock can use it).
* Eliminate the need of explicitly add a module into the `AVAILABLE_BLOCKS` list, any block class under the `block` folder will be auto-discovered.
* Few patches on the existing blocks.