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
2 changes: 1 addition & 1 deletion docs/blog/posts/logfire.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ Logfire can help us to log this entire function, and what's happening inside it,
def classify(data: str) -> SinglePrediction:
"""Perform single-label classification on the input text."""
return client.chat.completions.create(
model="gpt-3.5-turbo-0613",
model="gpt-4o-mini",
response_model=SinglePrediction,
messages=[
{
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/exact_citations.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ class QuestionAnswer(BaseModel):
# <%hide%>
def ask_ai(question: str, context: str) -> QuestionAnswer:
return client.chat.completions.create(
model="gpt-3.5-turbo-0613",
model="gpt-4o-mini",
temperature=0,
response_model=QuestionAnswer,
messages=[
Expand Down
2 changes: 1 addition & 1 deletion examples/auto-ticketer/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class ActionItems(BaseModel):

def generate(data: str):
return client.chat.completions.create(
model="gpt-3.5-turbo-0613",
model="gpt-4o-mini",
response_model=ActionItems,
messages=[
{
Expand Down
2 changes: 1 addition & 1 deletion examples/citation_with_extraction/citation_fuzzy_match.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def validate_sources(self) -> "QuestionAnswer":

def ask_ai(question: str, context: str) -> QuestionAnswer:
return client.chat.completions.create(
model="gpt-3.5-turbo-0613",
model="gpt-4o-mini",
temperature=0,
response_model=QuestionAnswer,
messages=[
Expand Down
2 changes: 1 addition & 1 deletion examples/citation_with_extraction/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class Question(BaseModel):
# Function to extract entities from input text using GPT-3.5
def stream_extract(question: Question) -> Iterable[Fact]:
completion = client.chat.completions.create(
model="gpt-3.5-turbo-0613",
model="gpt-4o-mini",
temperature=0,
stream=True,
functions=[QuestionAnswer.openai_schema],
Expand Down
2 changes: 1 addition & 1 deletion examples/classification/multi_prediction.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class MultiClassPrediction(BaseModel):
# Modify the classify function
def multi_classify(data: str) -> MultiClassPrediction:
return client.chat.completions.create(
model="gpt-3.5-turbo-0613",
model="gpt-4o-mini",
response_model=MultiClassPrediction,
messages=[
{
Expand Down
2 changes: 1 addition & 1 deletion examples/classification/simple_prediction.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class SinglePrediction(BaseModel):

def classify(data: str) -> SinglePrediction:
return client.chat.completions.create(
model="gpt-3.5-turbo-0613",
model="gpt-4o-mini",
response_model=SinglePrediction,
messages=[
{
Expand Down
2 changes: 1 addition & 1 deletion examples/gpt-engineer/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class Program(OpenAISchema):

def develop(data: str) -> Program:
completion = client.chat.completions.create(
model="gpt-3.5-turbo-0613",
model="gpt-4o-mini",
temperature=0.1,
functions=[Program.openai_schema],
function_call={"name": Program.openai_schema["name"]},
Expand Down
2 changes: 1 addition & 1 deletion examples/logfire/classify.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class SinglePrediction(BaseModel):
def classify(data: str) -> SinglePrediction:
"""Perform single-label classification on the input text."""
return client.chat.completions.create(
model="gpt-3.5-turbo-0613",
model="gpt-4o-mini",
response_model=SinglePrediction,
messages=[
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def dependencies(self, idz: list[int]) -> list[Query]:

def query_planner(question: str, plan=False) -> QueryPlan:
PLANNING_MODEL = "gpt-4"
ANSWERING_MODEL = "gpt-3.5-turbo-0613"
ANSWERING_MODEL = "gpt-4o-mini"

messages = [
{
Expand Down
2 changes: 1 addition & 1 deletion examples/recursive_filepaths/parse_recursive_paths.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def parse_tree_to_filesystem(data: str) -> DirectoryTree:
"""

completion = client.chat.completions.create(
model="gpt-3.5-turbo-0613",
model="gpt-4o-mini",
response_model=DirectoryTree,
messages=[
{
Expand Down
2 changes: 1 addition & 1 deletion examples/safer_sql_example/safe_sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def to_sql(self):

def create_query(data: str) -> SQL:
completion = client.chat.completions.create(
model="gpt-3.5-turbo-0613",
model="gpt-4o-mini",
temperature=0,
functions=[SQL.openai_schema],
function_call={"name": SQL.openai_schema["name"]},
Expand Down
2 changes: 1 addition & 1 deletion examples/simple-extraction/maybe_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class UserDetail(BaseModel):

def get_user_detail(string) -> MaybeUser: # type: ignore
return client.chat.completions.create(
model="gpt-3.5-turbo-0613",
model="gpt-4o-mini",
response_model=MaybeUser,
messages=[
{
Expand Down
2 changes: 1 addition & 1 deletion examples/simple-extraction/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class UserDetail(BaseModel):

def get_user_detail(string) -> UserDetail:
return client.chat.completions.create(
model="gpt-3.5-turbo-0613",
model="gpt-4o-mini",
response_model=UserDetail,
messages=[
{
Expand Down
2 changes: 1 addition & 1 deletion instructor/validation/llm_validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class User(BaseModel):

Parameters:
statement (str): The statement to validate
model (str): The LLM to use for validation (default: "gpt-3.5-turbo-0613")
model (str): The LLM to use for validation (default: "gpt-4o-mini")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docstring default now says 'gpt-4o-mini', but the function signature still defaults to 'gpt-3.5-turbo'. Update the parameter default for consistency.

temperature (float): The temperature to use for the LLM (default: 0)
client (OpenAI): The OpenAI client to use (default: None)
"""
Expand Down