Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions examples/conversational-rag/graph_db_example/notebook.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@
" messages = state[\"chat_history\"]\n",
" # Call the function\n",
" response = client.chat.completions.create(\n",
" model=\"gpt-4-turbo-preview\",\n",
" model=\"gpt-4o\",\n",
" messages=messages,\n",
" tools=[run_cypher_query_tool_description],\n",
" tool_choice=\"auto\",\n",
Expand Down Expand Up @@ -315,7 +315,7 @@
" \"\"\"AI step to generate the response given the current chat history.\"\"\"\n",
" messages = state[\"chat_history\"]\n",
" response = client.chat.completions.create(\n",
" model=\"gpt-4-turbo-preview\",\n",
" model=\"gpt-4o\",\n",
" messages=messages,\n",
" ) # get a new response from the model where it can see the function response\n",
" response_message = response.choices[0].message\n",
Expand Down
4 changes: 2 additions & 2 deletions examples/multi-modal-chatbot/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def choose_mode(state: State) -> State:
)

result = _get_openai_client().chat.completions.create(
model="gpt-4",
model="gpt-4o",
messages=[
{"role": "system", "content": "You are a helpful assistant"},
{"role": "user", "content": prompt},
Expand Down Expand Up @@ -100,7 +100,7 @@ def prompt_for_more(state: State) -> State:

@action(reads=["prompt", "chat_history", "mode"], writes=["response"])
def chat_response(
state: State, prepend_prompt: str, display_type: str = "text", model: str = "gpt-3.5-turbo"
state: State, prepend_prompt: str, display_type: str = "text", model: str = "gpt-4o-mini"
) -> State:
chat_history = copy.deepcopy(state["chat_history"])
chat_history[-1]["content"] = f"{prepend_prompt}: {chat_history[-1]['content']}"
Expand Down
2 changes: 1 addition & 1 deletion examples/multi-modal-chatbot/burr_demo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@
"\n",
"@action(reads=[\"prompt\", \"chat_history\", \"mode\"], writes=[\"response\"])\n",
"def chat_response(\n",
" state: State, prepend_prompt: str, model: str = \"gpt-3.5-turbo\"\n",
" state: State, prepend_prompt: str, model: str = \"gpt-4o-mini\"\n",
") -> State:\n",
"\n",
" chat_history = copy.deepcopy(state[\"chat_history\"])\n",
Expand Down
2 changes: 1 addition & 1 deletion examples/other-examples/hamilton-multi-modal/dag.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def client() -> openai.Client:


def text_model() -> str:
return "gpt-3.5-turbo"
return "gpt-4o-mini"


def image_model() -> str:
Expand Down
2 changes: 1 addition & 1 deletion examples/simple-chatbot-intro/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def ai_response(state: State) -> Tuple[dict, State]:
client = openai.Client() # replace this with your favorite LLM client library
content = (
client.chat.completions.create(
model="gpt-3.5-turbo",
model="gpt-4o-mini",
messages=state["chat_history"],
)
.choices[0]
Expand Down
2 changes: 1 addition & 1 deletion examples/simple-chatbot-intro/notebook.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
" but we wanted to keep it simple to demonstrate\"\"\"\n",
" client = openai.Client() # replace with your favorite LLM client library\n",
" content = client.chat.completions.create(\n",
" model=\"gpt-3.5-turbo\",\n",
" model=\"gpt-4o-mini\",\n",
" messages=state[\"chat_history\"],\n",
" ).choices[0].message.content\n",
" chat_item = {\n",
Expand Down
2 changes: 1 addition & 1 deletion examples/streaming-fastapi/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ async def prompt_for_more(state: State) -> AsyncGenerator[Tuple[dict, Optional[S

@streaming_action(reads=["prompt", "chat_history", "mode"], writes=["response"])
async def chat_response(
state: State, prepend_prompt: str, model: str = "gpt-3.5-turbo"
state: State, prepend_prompt: str, model: str = "gpt-4o-mini"
) -> AsyncGenerator[Tuple[dict, Optional[State]], None]:
"""Streaming action, as we don't have the result immediately. This makes it more interactive"""
chat_history = copy.deepcopy(state["chat_history"])
Expand Down
4 changes: 2 additions & 2 deletions examples/streaming-overview/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def choose_mode(state: State) -> Tuple[dict, State]:
)

result = _get_openai_client().chat.completions.create(
model="gpt-4",
model="gpt-4o",
messages=[
{"role": "system", "content": "You are a helpful assistant"},
{"role": "user", "content": prompt},
Expand Down Expand Up @@ -89,7 +89,7 @@ def prompt_for_more(state: State) -> Tuple[dict, State]:

@streaming_action(reads=["prompt", "chat_history", "mode"], writes=["response"])
def chat_response(
state: State, prepend_prompt: str, model: str = "gpt-3.5-turbo"
state: State, prepend_prompt: str, model: str = "gpt-4o-mini"
) -> Generator[Tuple[dict, Optional[State]], None, None]:
"""Streaming action, as we don't have the result immediately. This makes it more interactive"""
chat_history = state["chat_history"].copy()
Expand Down
4 changes: 2 additions & 2 deletions examples/streaming-overview/async_application.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ async def choose_mode(state: State) -> Tuple[dict, State]:
)

result = await _get_openai_client().chat.completions.create(
model="gpt-4",
model="gpt-4o",
messages=[
{"role": "system", "content": "You are a helpful assistant"},
{"role": "user", "content": prompt},
Expand Down Expand Up @@ -90,7 +90,7 @@ def prompt_for_more(state: State) -> Tuple[dict, State]:

@streaming_action(reads=["prompt", "chat_history", "mode"], writes=["response"])
async def chat_response(
state: State, prepend_prompt: str, model: str = "gpt-3.5-turbo"
state: State, prepend_prompt: str, model: str = "gpt-4o-mini"
) -> Tuple[dict, State]:
"""Streaming action, as we don't have the result immediately. This makes it more interactive"""
chat_history = state["chat_history"].copy()
Expand Down
2 changes: 1 addition & 1 deletion examples/talks/data_for_ai_oct_2024.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@
"\n",
"@action(reads=[\"prompt\", \"chat_history\", \"mode\"], writes=[\"response\"])\n",
"def chat_response(\n",
" state: State, prepend_prompt: str, model: str = \"gpt-3.5-turbo\"\n",
" state: State, prepend_prompt: str, model: str = \"gpt-4o-mini\"\n",
") -> State:\n",
" \n",
" chat_history = copy.deepcopy(state[\"chat_history\"])\n",
Expand Down
2 changes: 1 addition & 1 deletion examples/test-case-creation/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def choose_mode(state: State) -> Tuple[dict, State]:
)

result = _get_openai_client().chat.completions.create(
model="gpt-4",
model="gpt-4o",
messages=[
{"role": "system", "content": "You are a helpful assistant"},
{"role": "user", "content": prompt},
Expand Down
4 changes: 2 additions & 2 deletions examples/tracing-and-spans/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def choose_mode(state: State, __tracer: TracerFactory) -> Tuple[dict, State]:
client = _get_openai_client()
with __tracer("query_openai") as tracer:
result = client.chat.completions.create(
model="gpt-4",
model="gpt-4o",
messages=[
{"role": "system", "content": "You are a helpful assistant"},
{"role": "user", "content": prompt},
Expand Down Expand Up @@ -107,7 +107,7 @@ def chat_response(
state: State,
prepend_prompt: str,
__tracer: TracerFactory,
model: str = "gpt-3.5-turbo",
model: str = "gpt-4o-mini",
) -> Tuple[dict, State]:
__tracer.log_attributes(model=model, prepend_prompt=prepend_prompt)
with __tracer("process_chat_history"):
Expand Down
2 changes: 1 addition & 1 deletion examples/tracing-and-spans/burr_otel_demo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@
"\n",
"@action(reads=[\"prompt\", \"chat_history\", \"mode\"], writes=[\"response\"])\n",
"def chat_response(\n",
" state: State, prepend_prompt: str, model: str = \"gpt-3.5-turbo\"\n",
" state: State, prepend_prompt: str, model: str = \"gpt-4o-mini\"\n",
") -> State:\n",
" \n",
" chat_history = copy.deepcopy(state[\"chat_history\"])\n",
Expand Down
Loading