Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
harishmohanraj committed Dec 19, 2024
1 parent 52026e4 commit c288101
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 6 deletions.
5 changes: 4 additions & 1 deletion autogen/oai/anthropic.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
Install the `anthropic` package by running `pip install --upgrade anthropic`.
- https://docs.anthropic.com/en/docs/quickstart-guide
```python
import autogen
config_list = [
Expand All @@ -22,12 +23,14 @@
]
assistant = autogen.AssistantAgent("assistant", llm_config={"config_list": config_list})
```
Example usage for Anthropic Bedrock:
Install the `anthropic` package by running `pip install --upgrade anthropic`.
- https://docs.anthropic.com/en/docs/quickstart-guide
```python
import autogen
config_list = [
Expand All @@ -42,7 +45,7 @@
]
assistant = autogen.AssistantAgent("assistant", llm_config={"config_list": config_list})
```
"""

from __future__ import annotations
Expand Down
3 changes: 2 additions & 1 deletion autogen/oai/bedrock.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
Install the `boto3` package by running `pip install --upgrade boto3`.
- https://docs.aws.amazon.com/bedrock/latest/userguide/conversation-inference.html
```python
import autogen
config_list = [
Expand All @@ -25,7 +26,7 @@
]
assistant = autogen.AssistantAgent("assistant", llm_config={"config_list": config_list})
```
"""

from __future__ import annotations
Expand Down
2 changes: 1 addition & 1 deletion website/mint.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"light": "/logo/ag2.svg"
},
"metadata": {
"og:image": "/logo/ag2.svg"
"og:image": "https://mintlify.s3.us-west-1.amazonaws.com/private-04b27de1/logo/ag2.svg"
},
"favicon": "/logo/ag2.svg",
"search": {
Expand Down
9 changes: 9 additions & 0 deletions website/process_api_reference.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# Copyright (c) 2023 - 2024, Owners of https://github.com/ag2ai
#
# SPDX-License-Identifier: Apache-2.0
#
# Portions derived from https://github.com/microsoft/autogen are under the MIT License.
# SPDX-License-Identifier: MIT
#!/usr/bin/env python

from __future__ import annotations

import argparse
Expand Down Expand Up @@ -70,6 +78,7 @@ def add_code_fences(content: str) -> str:
Returns:
Content with Python code blocks properly fenced
"""
return content
lines = content.split("\n")
output = []
i = 0
Expand Down
19 changes: 16 additions & 3 deletions website/process_notebooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,11 +426,24 @@ def post_process_mdx(rendered_mdx: Path, source_notebooks: Path, front_matter: D
github_link = f"https://github.com/ag2ai/ag2/blob/main/{repo_relative_notebook}"
content = (
content[:title_end]
+ "\n[![Open on GitHub](https://img.shields.io/badge/Open%20on%20GitHub-grey?logo=github)]("
+ github_link
+ ")"
+ f'\n<a href="{github_link}" target="_blank">'
+ """<img noZoom src="https://img.shields.io/badge/Open%20on%20GitHub-grey?logo=github" alt="Open on GitHub" />"""
+ "</a>"
+ content[title_end:]
)
# content = (
# content[:title_end]
# + '<a href="https://img.shields.io/badge/Open%20on%20GitHub-grey?logo=github)]('
# + github_link
# + ")"
# + """ target="_blank" alt="Open on GitHub">
# <img noZoom src="/path/image.jpg"/>
# </a>"""
# + "\n[![Open on GitHub](https://img.shields.io/badge/Open%20on%20GitHub-grey?logo=github)]("
# + github_link
# + ")"
# + content[title_end:]
# )

# If no colab link is present, insert one
if "colab-badge.svg" not in content:
Expand Down
1 change: 1 addition & 0 deletions website/snippets/components/GalleryPage.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ export const GalleryPage = ({
<CardGroup cols={3}>
{galleryItems.map((item, index) => (
<Card key={index} href={item.link}>
{imageFunc(item)}
<h5 className="card-title">{item.title}</h5>
{badges(item)}
<p className="card-description">{item.description || item.title}</p>
Expand Down

0 comments on commit c288101

Please sign in to comment.