<!-- Thank you for your contribution! Please review
https://microsoft.github.io/autogen/docs/Contribute before opening a
pull request. -->
<!-- Please add a reviewer to the assignee section when you create a PR.
If you don't have the access to it, we will shortly find a reviewer and
assign them to your PR. -->
## Why are these changes needed?
FunctionTool supports passing in a partial
## Related issue number
Closes#5151
## Checks
- [x] I've included any doc changes needed for
https://microsoft.github.io/autogen/. See
https://microsoft.github.io/autogen/docs/Contribute#documentation to
build and test documentation locally.
- [x] I've added tests (if relevant) corresponding to the changes
introduced in this PR.
- [x] I've made sure all auto checks have passed.
Resolves#3983
* introduce `model_client_stream` parameter in `AssistantAgent` to
enable token-level streaming output.
* introduce `ModelClientStreamingChunkEvent` as a type of `AgentEvent`
to pass the streaming chunks to the application via `run_stream` and
`on_messages_stream`. Although this will not affect the inner messages
list in the final `Response` or `TaskResult`.
* handle this new message type in `Console`.
<!-- Thank you for your contribution! Please review
https://microsoft.github.io/autogen/docs/Contribute before opening a
pull request. -->
<!-- Please add a reviewer to the assignee section when you create a PR.
If you don't have the access to it, we will shortly find a reviewer and
assign them to your PR. -->
## Why are these changes needed?
It is currently hard to add a description to a component (defaults to
None also) .. you have to call super.dump() modify and return. This PR
makes the experience better.
- allows you specify `component_description` and `component_label` as an
optional class var. label is an optional human readable name for the the
component.
- will use component_description if provided int he description field
when dumped if there is no description, will use the first line of class
docstring. Takes advantage of all the good practices we have in writing
good docstrings. label defaults to component type.
For example
```python
model_client=OpenAIChatCompletionClient( model="gpt-4o-2024-08-06" )
config = model_client.dump_component()
print(config.model_dump_json())
```
Note the description field below is no longer None and there is a label
```python
{
"provider": "autogen_ext.models.openai.OpenAIChatCompletionClient",
"component_type": "model",
"version": 1,
"component_version": 1,
"description": "Chat completion client for OpenAI hosted models.",
"label": "OpenAIChatCompletionClient",
"config": { "model": "gpt-4o-2024-08-06" }
}
```
<!-- Please give a short summary of the change and the problem this
solves. -->
## Related issue number
<!-- For example: "Closes #1234" -->
None, felt faster to fix.
## Checks
- [x] I've included any doc changes needed for
https://microsoft.github.io/autogen/. See
https://microsoft.github.io/autogen/docs/Contribute#documentation to
build and test documentation locally.
- [x] I've added tests (if relevant) corresponding to the changes
introduced in this PR.
- [x] I've made sure all auto checks have passed.
Partially resolves: #5118
Once the extension page is ready, update the tutorial pages to reduce
duplication.
---------
Co-authored-by: Victor Dibia <victordibia@microsoft.com>
* Rebase to latest main branch
* Moved _azure module to azure
* Validate extra_create_args in and json response
* Added Support for Github Models
* Added normalize_name and assert_valid name
* Added Tests for AzureAIChatCompletionClient
* WIP: Azure AI Client
* Added: object-level usage data
* Added: doc string
* Added: check existing response_format value
* Added: _validate_config and _create_client
* lint
* merge dependencies
* add tests for img and function calling
* support actual tests through env vars
* address mypy errors
* doc example fix
* fmt
* fix doc fmt
* Update python/packages/autogen-ext/src/autogen_ext/models/azure/_azure_ai_client.py
---------
Co-authored-by: Rohan Thacker <thackerrohan4@gmail.com>
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
Co-authored-by: Leonardo Pinheiro <lpinheiro@microsoft.com>
* initial pass on making group chats declarative
* update group chat tests
* update impl to include participant serialization for all teams
* v1 making soc declarative
* update memory test
* update chatagent and team base classes
* update serialization doc notebook
* fomating updates
* vi1 for declarative tools
* make functtools declarative
* add tests
* update imports
* update formatting
* move tests, format fixes
* format updates
* update test
* add user warning to _from_config
* add warning on load_component to docs
---------
Co-authored-by: Ryan Sweet <rysweet@microsoft.com>
* use caching to run tests and report coverage
* fix test step dep name
* try to fix cov fname
* add working dir to mv step
* update artifact download
* fmt
* reduce concurrency on ext test
---------
Co-authored-by: Leonardo Pinheiro <lpinheiro@microsoft.com>
* v1, make assistant agent declarative
* make head tail context declarative
* update and formatting
* update assistant, format updates
* make websurfer declarative
* update formatting
* move declarative docs to advanced section
* remove tools until implemented
* minor updates to termination conditions
* update docs
* Update tools.ipynb: concat system messages in the tool_agent_caller_loop session
* Fix type mismatch on list concatenation
---------
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
* Add ChatCompletionCache along with AbstractStore for caching completions
* Addressing comments
* Improve interface for cachestore
* Improve documentation & revert protocol
* Make cache store typed, and improve docs
* remove unnecessary casts
* Add tiktoken as a dependency in pyproject.toml
Signed-off-by: Johan Forngren <johan.forngren@decerno.se>
Update uv.lock with tiktoken dependency from fbfdc9f652384b70f7461c90ada13f87e83677e0
Signed-off-by: Johan Forngren <johan.forngren@decerno.se>
* Updating autogen-ext dependencies per https://github.com/microsoft/autogen/pull/5008#issuecomment-2585383877
Signed-off-by: Johan Forngren <johan.forngren@decerno.se>
* PoC dev container
Signed-off-by: Johan Forngren <johan.forngren@decerno.se>
* Enhance devcontainer setup with post-create script for dependency installation and improved performance. Removed partial hot reload setup, as it required bigger changes to the project. Improved documentation, and fixed markdown lint issues.
Signed-off-by: Johan Forngren <johan.forngren@decerno.se>
* Update installation documentation for AutoGen Studio, clarifying installation methods and improving formatting. Adjusted notes for Windows users and corrected minor grammatical issues.
Signed-off-by: Johan Forngren <johan.forngren@decerno.se>
* Fixing typos. Restructuring text to avoid consecutive markdown quote blocks separated only by a blank line to avoid MD028 - Blank line inside blockquote.
Signed-off-by: Johan Forngren <johan.forngren@decerno.se>
* Include dev containers tutorial
Signed-off-by: Johan Forngren <johan.forngren@decerno.se>
* Update dev container installation instructions
Signed-off-by: Johan Forngren <johan.forngren@decerno.se>
---------
Signed-off-by: Johan Forngren <johan.forngren@decerno.se>
Co-authored-by: Victor Dibia <victordibia@microsoft.com>
* initial base memroy impl
* update, add example with chromadb
* include mimetype consideration
* add transform method
* update to address feedback, will update after 4681 is merged
* update memory impl,
* remove chroma db, typing fixes
* format, add test
* update uv lock
* update docs
* format updates
* update notebook
* add memoryqueryevent message, yield message for observability.
* minor fixes, make score optional/none
* Update python/packages/autogen-agentchat/src/autogen_agentchat/agents/_assistant_agent.py
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
* update tests to improve cov
* refactor, move memory to core.
* format fixxes
* format updates
* format updates
* fix azure notebook import, other fixes
* update notebook, support str query in Memory protocol
* update test
* update cells
* add specific extensible return types to memory query and update_context
---------
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
* make termination condition declarative
* make all term conditions declarative
* make And/OrTermination top level objects in base
* add basic tests
* add tutorial notebook
* update tests and formatting
* update tests
* update declarative config with updated api.
* Split apart component infra to allow for abstract class integration
* fix is_component_class check
* make is_ functions type guards
* Simplify component creation
* undo changes
* Format
* Add AGS to README.md
* Add appdir argument to avoid conflicting with older .autogenstudio home directory files.
---------
Co-authored-by: Victor Dibia <victordibia@microsoft.com>
* Fix: Properly await `agent.run()` in README `Hello World` example
- Updated the `Hello World` code sample to use `asyncio` for proper coroutine handling.
- Resolved `RuntimeWarning` caused by not awaiting the `agent.run()` method.
- Ensures the example executes correctly without errors or warnings.
* Add await to agent.run call in index.md
* Fix hello world
---------
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>