diff --git a/examples/conversational-rag/graph_db_example/notebook.ipynb b/examples/conversational-rag/graph_db_example/notebook.ipynb index 13758a357..7625cbe28 100644 --- a/examples/conversational-rag/graph_db_example/notebook.ipynb +++ b/examples/conversational-rag/graph_db_example/notebook.ipynb @@ -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", @@ -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", diff --git a/examples/multi-modal-chatbot/application.py b/examples/multi-modal-chatbot/application.py index 63b495366..663d22d48 100644 --- a/examples/multi-modal-chatbot/application.py +++ b/examples/multi-modal-chatbot/application.py @@ -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}, @@ -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']}" diff --git a/examples/multi-modal-chatbot/burr_demo.ipynb b/examples/multi-modal-chatbot/burr_demo.ipynb index 5f26a6f5f..ae22ce127 100644 --- a/examples/multi-modal-chatbot/burr_demo.ipynb +++ b/examples/multi-modal-chatbot/burr_demo.ipynb @@ -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", diff --git a/examples/other-examples/hamilton-multi-modal/dag.py b/examples/other-examples/hamilton-multi-modal/dag.py index df7b9d535..61d52d4b7 100644 --- a/examples/other-examples/hamilton-multi-modal/dag.py +++ b/examples/other-examples/hamilton-multi-modal/dag.py @@ -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: diff --git a/examples/simple-chatbot-intro/application.py b/examples/simple-chatbot-intro/application.py index c96f95169..702de7acb 100644 --- a/examples/simple-chatbot-intro/application.py +++ b/examples/simple-chatbot-intro/application.py @@ -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] diff --git a/examples/simple-chatbot-intro/notebook.ipynb b/examples/simple-chatbot-intro/notebook.ipynb index 93ba520a3..9e8c1bfc3 100644 --- a/examples/simple-chatbot-intro/notebook.ipynb +++ b/examples/simple-chatbot-intro/notebook.ipynb @@ -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", diff --git a/examples/streaming-fastapi/application.py b/examples/streaming-fastapi/application.py index d90a5e335..5685627e2 100644 --- a/examples/streaming-fastapi/application.py +++ b/examples/streaming-fastapi/application.py @@ -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"]) diff --git a/examples/streaming-overview/application.py b/examples/streaming-overview/application.py index 34fe1b204..911ee5f7f 100644 --- a/examples/streaming-overview/application.py +++ b/examples/streaming-overview/application.py @@ -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}, @@ -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() diff --git a/examples/streaming-overview/async_application.py b/examples/streaming-overview/async_application.py index 111852332..4ca8402a5 100644 --- a/examples/streaming-overview/async_application.py +++ b/examples/streaming-overview/async_application.py @@ -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}, @@ -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() diff --git a/examples/talks/data_for_ai_oct_2024.ipynb b/examples/talks/data_for_ai_oct_2024.ipynb index 49eb22f6c..d135741cd 100644 --- a/examples/talks/data_for_ai_oct_2024.ipynb +++ b/examples/talks/data_for_ai_oct_2024.ipynb @@ -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", diff --git a/examples/test-case-creation/application.py b/examples/test-case-creation/application.py index a10786d83..20a0a1a0f 100644 --- a/examples/test-case-creation/application.py +++ b/examples/test-case-creation/application.py @@ -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}, diff --git a/examples/tracing-and-spans/application.py b/examples/tracing-and-spans/application.py index 1116bf71d..a07ce0934 100644 --- a/examples/tracing-and-spans/application.py +++ b/examples/tracing-and-spans/application.py @@ -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}, @@ -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"): diff --git a/examples/tracing-and-spans/burr_otel_demo.ipynb b/examples/tracing-and-spans/burr_otel_demo.ipynb index 918acb857..7d6b30f22 100644 --- a/examples/tracing-and-spans/burr_otel_demo.ipynb +++ b/examples/tracing-and-spans/burr_otel_demo.ipynb @@ -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",