Skip to content

Commit 479696c

Browse files
committed
Merge branch 'custom_client' of github.com:olgavrou/autogen into custom_client
2 parents 26d45de + 1ea55cc commit 479696c

File tree

5 files changed

+20
-5
lines changed

5 files changed

+20
-5
lines changed

autogen/agentchat/conversable_agent.py

+9-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import re
88
from collections import defaultdict
99
from typing import Any, Awaitable, Callable, Dict, List, Literal, Optional, Tuple, Type, TypeVar, Union
10+
import warnings
1011

1112
from .. import OpenAIWrapper, ModelClient
1213
from ..cache.cache import Cache
@@ -69,7 +70,7 @@ def __init__(
6970
max_consecutive_auto_reply: Optional[int] = None,
7071
human_input_mode: Optional[str] = "TERMINATE",
7172
function_map: Optional[Dict[str, Callable]] = None,
72-
code_execution_config: Optional[Union[Dict, Literal[False]]] = None,
73+
code_execution_config: Union[Dict, Literal[False]] = {},
7374
llm_config: Optional[Union[Dict, Literal[False]]] = None,
7475
default_auto_reply: Optional[Union[str, Dict, None]] = "",
7576
description: Optional[str] = None,
@@ -139,6 +140,13 @@ def __init__(
139140
# Initialize standalone client cache object.
140141
self.client_cache = None
141142

143+
if code_execution_config is None:
144+
warnings.warn(
145+
"Using None to signal a default code_execution_config is deprecated. "
146+
"Use {} to use default or False to disable code execution.",
147+
stacklevel=2,
148+
)
149+
142150
self._code_execution_config: Union[Dict, Literal[False]] = (
143151
{} if code_execution_config is None else code_execution_config
144152
)

autogen/oai/openai_utils.py

+2
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@
4646
"gpt-3.5-turbo-1106": (0.001, 0.002),
4747
"gpt-35-turbo-1106": (0.001, 0.002),
4848
"gpt-4-1106-preview": (0.01, 0.03),
49+
"gpt-4-0125-preview": (0.01, 0.03),
50+
"gpt-4-turbo-preview": (0.01, 0.03),
4951
"gpt-4-1106-vision-preview": (0.01, 0.03), # TODO: support vision pricing of images
5052
}
5153

autogen/token_count_utils.py

+2
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ def get_max_token_limit(model="gpt-3.5-turbo-0613"):
2828
"gpt-4-0613": 8192,
2929
"gpt-4-32k-0613": 32768,
3030
"gpt-4-1106-preview": 128000,
31+
"gpt-4-0125-preview": 128000,
32+
"gpt-4-turbo-preview": 128000,
3133
"gpt-4-vision-preview": 128000,
3234
}
3335
return max_token_limit[model]

notebook/agentchat_auto_feedback_from_code_execution.ipynb

+5-4
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
"from typing import Dict, Union\n",
6868
"\n",
6969
"from IPython import get_ipython\n",
70-
"from IPython.display import Image\n",
70+
"from IPython.display import display, Image\n",
7171
"\n",
7272
"import autogen\n",
7373
"\n",
@@ -498,7 +498,7 @@
498498
},
499499
{
500500
"cell_type": "code",
501-
"execution_count": 5,
501+
"execution_count": null,
502502
"metadata": {},
503503
"outputs": [
504504
{
@@ -515,7 +515,8 @@
515515
],
516516
"source": [
517517
"try:\n",
518-
" Image(filename=\"coding/stock_price_ytd.png\")\n",
518+
" image = Image(filename=\"coding/stock_price_ytd.png\")\n",
519+
" display(image)\n",
519520
"except FileNotFoundError:\n",
520521
" print(\"Image not found. Please check the file name and modify if necessary.\")"
521522
]
@@ -813,7 +814,7 @@
813814
"name": "python",
814815
"nbconvert_exporter": "python",
815816
"pygments_lexer": "ipython3",
816-
"version": "3.11.4"
817+
"version": "3.10.13"
817818
},
818819
"vscode": {
819820
"interpreter": {

website/docs/Contribute.md

+2
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ pip install pydoc-markdown # skip if you use the dev container we provided
201201
cd website
202202
yarn install --frozen-lockfile --ignore-engines
203203
pydoc-markdown
204+
quarto render ./docs
204205
yarn start
205206
```
206207

@@ -225,6 +226,7 @@ Once at the CLI in Docker run the following commands:
225226
cd website
226227
yarn install --frozen-lockfile --ignore-engines
227228
pydoc-markdown
229+
quarto render ./docs
228230
yarn start --host 0.0.0.0 --port 3000
229231
```
230232

0 commit comments

Comments
 (0)