Skip to content

Commit

Permalink
Merge branch 'main' into agentchat_memory_vd
Browse files Browse the repository at this point in the history
  • Loading branch information
victordibia authored Jan 10, 2025
2 parents 7b5b97c + 115fefa commit c6e4825
Show file tree
Hide file tree
Showing 11 changed files with 62 additions and 26 deletions.
35 changes: 18 additions & 17 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,23 +32,23 @@ jobs:
version:
[
# For main use the workflow target
{ ref: "${{github.ref}}", dest-dir: dev, uv-version: "0.5.13" },
{ ref: "v0.4.0", dest-dir: stable, uv-version: "0.5.13" },
{ ref: "v0.4.0.dev0", dest-dir: "0.4.0.dev0", uv-version: "0.5.11" },
{ ref: "v0.4.0.dev1", dest-dir: "0.4.0.dev1", uv-version: "0.5.11" },
{ ref: "v0.4.0.dev2", dest-dir: "0.4.0.dev2", uv-version: "0.5.11" },
{ ref: "v0.4.0.dev3", dest-dir: "0.4.0.dev3", uv-version: "0.5.11" },
{ ref: "v0.4.0.dev4", dest-dir: "0.4.0.dev4", uv-version: "0.5.11" },
{ ref: "v0.4.0.dev5", dest-dir: "0.4.0.dev5", uv-version: "0.5.11" },
{ ref: "v0.4.0.dev6", dest-dir: "0.4.0.dev6", uv-version: "0.5.11" },
{ ref: "v0.4.0.dev7", dest-dir: "0.4.0.dev7", uv-version: "0.5.11" },
{ ref: "v0.4.0.dev8", dest-dir: "0.4.0.dev8", uv-version: "0.5.11" },
{ ref: "v0.4.0.dev9", dest-dir: "0.4.0.dev9", uv-version: "0.5.11" },
{ ref: "v0.4.0.dev10", dest-dir: "0.4.0.dev10", uv-version: "0.5.11" },
{ ref: "v0.4.0.dev11", dest-dir: "0.4.0.dev11", uv-version: "0.5.11" },
{ ref: "v0.4.0.dev12", dest-dir: "0.4.0.dev12", uv-version: "0.5.13" },
{ ref: "v0.4.0.dev13", dest-dir: "0.4.0.dev13", uv-version: "0.5.13" },
{ ref: "v0.4.0", dest-dir: "0.4.0", uv-version: "0.5.13" },
{ ref: "${{github.ref}}", dest-dir: dev, uv-version: "0.5.13", sphinx-release-override: "dev" },
{ ref: "v0.4.0.post1", dest-dir: stable, uv-version: "0.5.13", sphinx-release-override: "stable" },
{ ref: "v0.4.0.dev0", dest-dir: "0.4.0.dev0", uv-version: "0.5.11", sphinx-release-override: "" },
{ ref: "v0.4.0.dev1", dest-dir: "0.4.0.dev1", uv-version: "0.5.11", sphinx-release-override: "" },
{ ref: "v0.4.0.dev2", dest-dir: "0.4.0.dev2", uv-version: "0.5.11", sphinx-release-override: "" },
{ ref: "v0.4.0.dev3", dest-dir: "0.4.0.dev3", uv-version: "0.5.11", sphinx-release-override: "" },
{ ref: "v0.4.0.dev4", dest-dir: "0.4.0.dev4", uv-version: "0.5.11", sphinx-release-override: "" },
{ ref: "v0.4.0.dev5", dest-dir: "0.4.0.dev5", uv-version: "0.5.11", sphinx-release-override: "" },
{ ref: "v0.4.0.dev6", dest-dir: "0.4.0.dev6", uv-version: "0.5.11", sphinx-release-override: "" },
{ ref: "v0.4.0.dev7", dest-dir: "0.4.0.dev7", uv-version: "0.5.11", sphinx-release-override: "" },
{ ref: "v0.4.0.dev8", dest-dir: "0.4.0.dev8", uv-version: "0.5.11", sphinx-release-override: "" },
{ ref: "v0.4.0.dev9", dest-dir: "0.4.0.dev9", uv-version: "0.5.11", sphinx-release-override: "" },
{ ref: "v0.4.0.dev10", dest-dir: "0.4.0.dev10", uv-version: "0.5.11", sphinx-release-override: "" },
{ ref: "v0.4.0.dev11", dest-dir: "0.4.0.dev11", uv-version: "0.5.11", sphinx-release-override: "" },
{ ref: "v0.4.0.dev12", dest-dir: "0.4.0.dev12", uv-version: "0.5.13", sphinx-release-override: "" },
{ ref: "v0.4.0.dev13", dest-dir: "0.4.0.dev13", uv-version: "0.5.13", sphinx-release-override: "" },
{ ref: "v0.4.0.post1", dest-dir: "0.4.0", uv-version: "0.5.13", sphinx-release-override: "" },
]
steps:
- name: Checkout
Expand All @@ -73,6 +73,7 @@ jobs:
env:
PY_DOCS_DIR: ${{ matrix.version.dest-dir }}/
PY_SWITCHER_VERSION: ${{ matrix.version.dest-dir }}
SPHINX_RELEASE_OVERRIDE: ${{ matrix.version.sphinx-release-override }}
- uses: actions/upload-artifact@v4
with:
path: "./python/docs-staging"
Expand Down
16 changes: 16 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,3 +118,19 @@ Args:
agent_type (str): Agent type to handle this subscription
"""
```

## Docs when adding a new API

Now that 0.4.0 is out, we should ensure the docs between versions are easy to navigate. To this end, added or changed APIs should have the following added to their docstrings respectively:

```rst
.. versionadded:: v0.4.1
Here's a version added message.
.. versionchanged:: v0.4.1
Here's a version changed message.
```

See [here](https://pydata-sphinx-theme.readthedocs.io/en/stable/examples/kitchen-sink/admonitions.html#versionadded) for how they are rendered.
2 changes: 1 addition & 1 deletion docs/switcher.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[
{
"name": "0.4.0 (stable)",
"version": "0.4.0",
"version": "stable",
"url": "/autogen/stable/",
"preferred": true
},
Expand Down
11 changes: 11 additions & 0 deletions python/packages/autogen-core/docs/src/_static/banner-override.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
var version = DOCUMENTATION_OPTIONS.VERSION;
if (version === "stable") {
var styles = `
#bd-header-version-warning {
display: none;
}
`
var styleSheet = document.createElement("style")
styleSheet.textContent = styles
document.head.appendChild(styleSheet)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<script src="_static/banner-override.js"></script>
10 changes: 7 additions & 3 deletions python/packages/autogen-core/docs/src/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,12 @@
copyright = "2024, Microsoft"
author = "Microsoft"
version = "0.4"
release = autogen_core.__version__

release_override = os.getenv("SPHINX_RELEASE_OVERRIDE")
if release_override is None or release_override == "":
release = autogen_core.__version__
else:
release = release_override

sys.path.append(str(Path(".").resolve()))

Expand Down Expand Up @@ -117,7 +121,7 @@

"footer_start": ["copyright"],
"footer_center": ["footer-middle-links"],
"footer_end": ["theme-version"],
"footer_end": ["theme-version", "version-banner-override"],
"pygments_light_style": "xcode",
"pygments_dark_style": "monokai",
"navbar_start": ["navbar-logo", "version-switcher"],
Expand All @@ -131,7 +135,7 @@
]
}

html_js_files = ["custom-icon.js"]
html_js_files = ["custom-icon.js", "banner-override.js"]
html_sidebars = {
"packages/index": [],
"user-guide/core-user-guide/**": ["sidebar-nav-bs-core"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ like software development.

A multi-agent design pattern is a structure that emerges from message protocols:
it describes how agents interact with each other to solve problems.
For example, the [tool-equiped agent](../framework/tools.ipynb#tool-equipped-agent) in
For example, the [tool-equipped agent](../framework/tools.ipynb#tool-equipped-agent) in
the previous section employs a design pattern called ReAct,
which involves an agent interacting with tools.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import importlib
import warnings
from typing import Any, ClassVar, Dict, Generic, Literal, Protocol, Type, cast, overload, runtime_checkable
from typing import Any, ClassVar, Dict, Generic, List, Literal, Protocol, Type, cast, overload, runtime_checkable

from pydantic import BaseModel
from typing_extensions import Self, TypeVar
Expand Down Expand Up @@ -243,9 +243,9 @@ def _from_config(cls, config: Config) -> MyComponent:
return cls(value=config.value)
"""

required_class_vars = ["component_config_schema", "component_type"]
required_class_vars: ClassVar[List[str]] = ["component_config_schema", "component_type"]

def __init_subclass__(cls, **kwargs: Any):
def __init_subclass__(cls, **kwargs: Any) -> None:
super().__init_subclass__(**kwargs)

# TODO: validate provider is loadable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ class OpenAIAssistantAgent(BaseChatAgent):
* Vector store integration for efficient file search
* Automatic file parsing and embedding
You can use an existing thread or assistant by providing the `thread_id` or `assistant_id` parameters.
Example:
.. code-block:: python
Expand Down Expand Up @@ -160,6 +162,7 @@ async def example():
instructions (str): System instructions for the assistant
tools (Optional[Iterable[Union[Literal["code_interpreter", "file_search"], Tool | Callable[..., Any] | Callable[..., Awaitable[Any]]]]]): Tools the assistant can use
assistant_id (Optional[str]): ID of existing assistant to use
thread_id (Optional[str]): ID of existing thread to use
metadata (Optional[object]): Additional metadata for the assistant
response_format (Optional[AssistantResponseFormatOptionParam]): Response format settings
temperature (Optional[float]): Temperature for response generation
Expand Down
Empty file.
2 changes: 1 addition & 1 deletion python/samples/agentchat_chainlit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,5 +104,5 @@ team = RoundRobinGroupChat(
In this example, we created a basic AutoGen team with a single agent in a RoundRobinGroupChat team. There are a few ways you can extend this example:

- Add more [agents](https://microsoft.github.io/autogen/dev/user-guide/agentchat-user-guide/tutorial/agents.html) to the team.
- Explor custom agents that sent multimodal messages
- Explore custom agents that sent multimodal messages
- Explore more [team](https://microsoft.github.io/autogen/dev/user-guide/agentchat-user-guide/tutorial/teams.html) types beyond the `RoundRobinGroupChat`.

0 comments on commit c6e4825

Please sign in to comment.