Commit Graph

146 Commits

Author SHA1 Message Date
Eric Zhu 403844ef2b
feat: add Semantic Kernel Adapter documentation and usage examples in user guides (#5256)
Partially address #5205 and #5226
2025-01-29 16:37:18 -08:00
Mohammad Mazraeh 2f1684b698
update dependencies to work with protobuf 5 (#5195)
Closes #5074

Signed-off-by: Mohammad Mazraeh <mazraeh.mohammad@gmail.com>
2025-01-28 22:11:54 -08:00
Eric Zhu 225eb9d0b2
feat: introduce ModelClientStreamingChunkEvent for streaming model output and update handling in agents and console (#5208)
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`.
2025-01-29 02:49:02 +00:00
Eric Zhu b29d0bda2f
update versions to 0.4.4 and m1 cli to 0.2.3 (#5229) 2025-01-28 17:59:14 +00:00
Jack Gerrits 7445e4b276
Remove channel based control plane APIs, cleanup proto (#5236) 2025-01-28 11:15:57 -05:00
Rohan Thacker d49bf346e0
Updated docs for _azure_ai_client.py (#5199)
Update a minor typo and updated the `response_format` documentation to
the new value

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2025-01-27 23:19:38 +00:00
Eric Zhu b441d5b43a
fix: Enhance OpenAI client to handle additional stop reasons and improve tool call validation in tests to address empty tool_calls list. (#5223)
Resolves #5222
2025-01-27 21:16:47 +00:00
Sachin Joglekar 8926206479
Implement default in-memory store for ChatCompletionCache (#5188) 2025-01-25 21:07:58 +00:00
Victor Dibia 67029853ec
make AssistantAgent and Handoff use BaseTool (#5193)
<!-- 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?

Make AssistantAgent and Handoff use BaseTool.  
This ensures that they can be made declarative/serialized

<!-- Please give a short summary of the change and the problem this
solves. -->

## Related issue number

<!-- For example: "Closes #1234" -->

## Checks

- [ ] 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.
- [ ] I've added tests (if relevant) corresponding to the changes
introduced in this PR.
- [ ] I've made sure all auto checks have passed.
2025-01-25 12:04:05 -08:00
Jack Gerrits 55e929db98
Impl register and add sub RPC (#5191)
* Refactor client id retrieval

* WIP

* fixes

* future annotations

* Fix tests

* remove import
2025-01-24 18:58:33 -05:00
Leonardo Pinheiro db2410c705
Feature/azure ai inference client (#5153)
* 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>
2025-01-25 08:26:48 +10:00
Jack Gerrits 1982f1b0ec
Improve grpc type checking (#5189) 2025-01-24 12:34:59 -08:00
Jack Gerrits b375d4b18c
Communicate client id via metadata in grpc runtime (#5185)
Communicate client id via metadata
2025-01-24 13:41:31 -05:00
Gerardo Moreno 89631966cb
RichConsole: Prettify m1 CLI console using rich #4806 (#5123) 2025-01-24 09:50:38 -08:00
Jack Gerrits 44b9bff466
Update proto to include remove sub, move to rpc based operations (#5168)
* Update proto to include remove sub, move to rpc based operations

* dont add a breaking change

* mypy fix
2025-01-23 22:46:47 +00:00
Leonardo Pinheiro 3fe106621e
fix: update SK model adapter constructor (#5150)
* update constructor

* fix typing error

* revert/fix doc changes

* add unsaved changes

---------

Co-authored-by: Leonardo Pinheiro <lpinheiro@microsoft.com>
2025-01-23 14:53:39 +10:00
Eric Zhu da1c2bf12e
fix: use tool_calls field to detect tool calls in OpenAI client; add integration tests for OpenAI and Gemini (#5122)
* fix: use tool_calls field to detect tool calls in OpenAI client

* Add unit tests for tool calling; and integration tests for openai and gemini
2025-01-21 09:06:19 -05:00
Eric Zhu 142e102ce8
fix: update gpt-4o model version to 2024-08-06 (#5117)
Co-authored-by: Ryan Sweet <rysweet@microsoft.com>
2025-01-20 21:15:04 +00:00
Eric Zhu af420a83e2
fix: ensure proper handling of structured output in OpenAI client and improve test coverage for structured output (#5116) 2025-01-20 20:54:39 +00:00
Leon De Andrade 34bc82e24f
Jupyter Code Executor in v0.4 (alternative implementation) (#4885) 2025-01-18 21:11:40 +00:00
Leonardo Pinheiro 918292f51e
Semantic kernel model adapter (#4851)
* initial sk model adapter implementation

* add sk tool module

* implement streaming and update tests

* update lock

* linting

* add semantic kernel extras

* add docstring and format

* update dependencies and format/lint

* add model info to sk constructor

* update uv.lock

* customize prompt settings

* update uv.lock

* add docs

* fix sk docstring linting

* update create docstrings

* fmt and improve tool docstring

* update sk tool docs

* coerce doc json serialization failure

---------

Co-authored-by: Leonardo Pinheiro <lpinheiro@microsoft.com>
2025-01-18 18:57:20 +10:00
Leonardo Pinheiro a1fdbd9692
Use caching to run tests and report coverage (#5086)
* 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>
2025-01-17 14:32:18 +00:00
Eric Zhu ce20de9afb
fix: normalize finish reason in CreateResult response (#5085)
Co-authored-by: Jack Gerrits <jackgerrits@users.noreply.github.com>
2025-01-17 14:10:06 +00:00
Victor Dibia c2a43e84a2
Declarative BaseChat Agents (#5055)
* 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
2025-01-16 22:29:40 -08:00
Sachin Joglekar 8bd65c672f
Add ChatCompletionCache along with AbstractStore for caching completions (#4924)
* 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
2025-01-16 15:47:38 -08:00
Jack Gerrits 1a3ac626eb
Update version to 0.4.3 pre-emptively (#5066)
* Update version to 0.4.3

* lock

* update lock

* lock
2025-01-15 19:11:32 -05:00
Hankyeol Kyung acb9117513
Update gpt-4o model version and add new model details (#5056)
feat: Update gpt-4o-2024-11-20 version and model pointer

- Add version information for gpt-4o-2024-11-20
- Update model pointer

Signed-off-by: Hankyeol Kyung <kghnkl0103@gmail.com>
Co-authored-by: Ryan Sweet <rysweet@microsoft.com>
Co-authored-by: gagb <gagb@users.noreply.github.com>
2025-01-15 19:44:43 +00:00
Jacob Alber ae98c9d764
feat: Change async input strategy (#5060) 2025-01-15 10:12:47 -05:00
Leonardo Pinheiro 95bd514a9a
Graphrag integration (#4612)
* add initial global search draft

* add graphrag dep

* fix local search embedding

* linting

* add from config constructor

* remove draft notebook

* update config factory and add docstrings

* add graphrag sample

* add sample prompts

* update readme

* update deps

* Add API docs

* Update python/samples/agentchat_graphrag/requirements.txt

* Update python/samples/agentchat_graphrag/requirements.txt

* update docstrings with snippet and doc ref

* lint

* improve set up instructions in docstring

* lint

* update lock

* Update python/packages/autogen-ext/src/autogen_ext/tools/graphrag/_global_search.py

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>

* Update python/packages/autogen-ext/src/autogen_ext/tools/graphrag/_local_search.py

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>

* add unit tests

* update lock

* update uv lock

* add docstring newlines

* stubs and typing on graphrag tests

* fix docstrings

* fix mypy error

* + linting and type fixes

* type fix graphrag sample

* Update python/packages/autogen-ext/src/autogen_ext/tools/graphrag/_global_search.py

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>

* Update python/packages/autogen-ext/src/autogen_ext/tools/graphrag/_local_search.py

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>

* Update python/samples/agentchat_graphrag/requirements.txt

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>

* update overrides

* fix docstring client imports

* additional docstring fix

* add docstring missing import

* use openai and fix db path

* use console for displaying messages

* add model config and gitignore

* update readme

* lint

* Update python/samples/agentchat_graphrag/README.md

* Update python/samples/agentchat_graphrag/README.md

* Comment remaining azure config

---------

Co-authored-by: Leonardo Pinheiro <lpinheiro@microsoft.com>
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2025-01-15 21:04:17 +10:00
Victor Dibia abbdbb2f87
Memory Interface in AgentChat (#4438)
* 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>
2025-01-14 07:06:13 +00:00
Jack Gerrits cf8446b37e
Fixup autogen-ext version (#5030)
* Update autogen-ext version

* lock
2025-01-13 21:31:41 +00:00
Jack Gerrits 91ec611338
Update version to 0.4.1 (#5029)
* Update version to 0.4.1

* lock

* dest dir

* remove website changes
2025-01-13 21:22:03 +00:00
Jack Gerrits 404522bd6b
Split apart component infra to allow for abstract class integration (#5017)
* 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
2025-01-13 15:58:38 -05:00
Jack Gerrits 70f7e998d2
fix: Fix provider string for AzureTokenProvider (#4992)
Fix provider string for AzureTokenProvider
2025-01-13 20:40:33 +00:00
Jack Gerrits c0082dd9cc
fix: Normalize openai client stop reason to make more robust (#5027)
* Normalize stop reason to make more robust

* format

* add unknown finish reason
2025-01-13 18:26:31 +00:00
Jack Gerrits 466848ac65
fix: fix user input in m1 (#4995)
* Add lock for input and output management in m1

* Use event to signal it is time to prompt for input

* undo stop change

* undo changes

* Update python/packages/magentic-one-cli/src/magentic_one_cli/_m1.py

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>

* reduce exported surface area

* fix

---------

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
Co-authored-by: Hussein Mozannar <hmozannar@microsoft.com>
2025-01-13 15:28:08 +00:00
Jack Gerrits 115fefa132
Add missing py.typed in autogen_ext, fix type issue in core (#4993) 2025-01-10 10:00:17 -08:00
Eric Zhu 001f0262ba
Minor API doc update for openai assistant agent (#4986) 2025-01-10 18:08:30 +10:00
Jack Gerrits c2721ff65b
Update all versions to 0.4.0 (#4941)
* Update all versions to 0.4.0

* update redirect

* install with upgrade for agentchat
2025-01-09 15:29:54 -05:00
Jack Gerrits 0122d44aa3
OpenAI assistant fixes (#4969) 2025-01-09 12:06:01 -08:00
Griffin Bassman 0446ce924f
feat: Add o1-2024-12-17 model (#4965)
Co-authored-by: Jack Gerrits <jackgerrits@users.noreply.github.com>
2025-01-09 11:05:20 -08:00
Jack Gerrits ecdf18d3f6
Make package readmes slightly less empty (#4961)
* Make package readmes slightly less empty

* Update python/packages/autogen-ext/README.md

---------

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2025-01-09 10:44:13 -08:00
afourney 7131dc945d
Added m1 cli package (#4949)
* Added m1 cli package
* update CI, install card, deprecations
* Update python/packages/magentic-one-cli/pyproject.toml
* fix mypy and pyright
* add package
* Suppress 'ResourceWarning: unclosed socket'

---------

Co-authored-by: Jack Gerrits
2025-01-08 14:05:08 -08:00
Eric Zhu 30cbbf7cad
Add pip install for magentic one and studio to homepage; update doc link (#4946)
* Add pip install for magentic one and studio to homepage; update doc link

* Update links
2025-01-08 10:52:33 -08:00
peterychang d610d481cd
Add documentation and TODOs for xlang (#4926)
Co-authored-by: Jack Gerrits <jackgerrits@users.noreply.github.com>
2025-01-08 14:16:43 +00:00
Jack Gerrits 7b10f0ad1b
Improve docs for model clients, add missing docs (#4930)
* Improve docs for model clients

* formatting

* Fix usage

---------

Co-authored-by: peterychang <49209570+peterychang@users.noreply.github.com>
2025-01-08 09:12:48 -05:00
peterychang 71a3b238e7
Activate deactivate agents (#4800)
* Instantiate and call activate/deactivate on agents

* autoformatting

* remove activate. Rename deactivate to close

* remove unneeded import

* create close fn in runtime

* change runtime close behavior

* uv.lock

---------

Co-authored-by: Jack Gerrits <jackgerrits@users.noreply.github.com>
2025-01-07 21:37:02 +00:00
Jack Gerrits d4b406b78c
refactor!: Reduce dependencies of core, remove image from URL (#4919)
* Reduce dependencies of core

* Update lock

* add package to test deps

* Update lock

* aio console dep

* Update lock
2025-01-07 18:30:04 +00:00
Jack Gerrits f4382f01c8
Log messages and response for LLMCall event (#4910)
* Log messages and response for LLMCall event

* Remove accidental change

* newline
2025-01-07 12:32:29 -05:00
Jack Gerrits 310564908b
fix!: Move azure auth provider to separate module (#4912)
* Move azure auth provider to separate module

* Update lock

* fix component gen
2025-01-07 12:21:50 -05:00