Skip to content

Commit d886f7c

Browse files
authored
Merge pull request #224 from restackio/update-llm-model
Update llm model to latest available
2 parents 8251376 + 0243550 commit d886f7c

File tree

28 files changed

+30
-30
lines changed

28 files changed

+30
-30
lines changed

agent_apis/src/functions/llm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ async def llm(function_input: FunctionInputParams) -> str:
4141
messages.append({"role": "user", "content": function_input.user_content})
4242

4343
response = client.chat.completions.create(
44-
model=function_input.model or "gpt-4o-mini", messages=messages
44+
model=function_input.model or "gpt-4.1-mini", messages=messages
4545
)
4646
log.info("llm function completed", response=response)
4747
return response.choices[0].message.content

agent_apis/src/workflows/multistep.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ async def run(self, workflow_input: WorkflowInputParams) -> dict:
3535
function_input=FunctionInputParams(
3636
system_content=f"You are a personal assitant and have access to weather data {weather_data}. Always greet person with relevant info from weather data",
3737
user_content=user_content,
38-
model="gpt-4o-mini",
38+
model="gpt-4.1-mini",
3939
),
4040
start_to_close_timeout=timedelta(seconds=120),
4141
)

agent_chat/src/functions/llm_chat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ async def llm_chat(agent_input: LlmChatInput) -> dict[str, str]:
4444
)
4545

4646
assistant_raw_response = client.chat.completions.create(
47-
model=agent_input.model or "gpt-4o-mini",
47+
model=agent_input.model or "gpt-4.1-mini",
4848
messages=agent_input.messages,
4949
)
5050
except Exception as e:

agent_rag/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ python -c "from src.services import watch_services; watch_services()"
5151

5252
Duplicate the `env.example` file and rename it to `.env`.
5353

54-
Obtain a Restack API Key to interact with the 'gpt-4o-mini' model at no cost from [console.restack.io](https://console.restack.io)
54+
Obtain a Restack API Key to interact with the 'gpt-4.1-mini' model at no cost from [console.restack.io](https://console.restack.io)
5555

5656
## Run agents
5757

agent_rag/src/functions/llm_chat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ async def llm_chat(function_input: LlmChatInput) -> ChatCompletion:
4545
)
4646

4747
response = client.chat.completions.create(
48-
model=function_input.model or "gpt-4o-mini",
48+
model=function_input.model or "gpt-4.1-mini",
4949
messages=function_input.messages,
5050
)
5151
except Exception as e:

agent_stream/src/functions/llm_chat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ async def llm_chat(function_input: LlmChatInput) -> str:
4040
messages_dicts = [message.model_dump() for message in function_input.messages]
4141
# Get the streamed response from OpenAI API
4242
response: Stream[ChatCompletionChunk] = client.chat.completions.create(
43-
model=function_input.model or "gpt-4o-mini",
43+
model=function_input.model or "gpt-4.1-mini",
4444
messages=messages_dicts,
4545
stream=True,
4646
)

agent_telephony/twilio_livekit/readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ docker run -d --pull always --name restack -p 5233:5233 -p 6233:6233 -p 7233:723
3131

3232
In all subfolders, duplicate the `env.example` file and rename it to `.env`.
3333

34-
Obtain a Restack API Key to interact with the 'gpt-4o-mini' model at no cost from [Restack Cloud](https://console.restack.io/starter)
34+
Obtain a Restack API Key to interact with the 'gpt-4.1-mini' model at no cost from [Restack Cloud](https://console.restack.io/starter)
3535

3636

3737
## Start Restack Agent with Twilio
@@ -102,7 +102,7 @@ python src/worker.py dev
102102

103103
Duplicate the `env.example` file and rename it to `.env`.
104104

105-
Obtain a Restack API Key to interact with the 'gpt-4o-mini' model at no cost from [Restack Cloud](https://console.restack.io/starter)
105+
Obtain a Restack API Key to interact with the 'gpt-4.1-mini' model at no cost from [Restack Cloud](https://console.restack.io/starter)
106106

107107
## Create a new Agent
108108

agent_telephony/vapi/agent_vapi/readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ docker run -d --pull always --name restack -p 5233:5233 -p 6233:6233 -p 7233:723
2828

2929
In all subfolders, duplicate the `env.example` file and rename it to `.env`.
3030

31-
Obtain a Restack API Key to interact with the 'gpt-4o-mini' model at no cost from [Restack Cloud](https://console.restack.io/starter)
31+
Obtain a Restack API Key to interact with the 'gpt-4.1-mini' model at no cost from [Restack Cloud](https://console.restack.io/starter)
3232

3333

3434
## Start Restack Agent with Twilio
@@ -99,7 +99,7 @@ python src/pipeline.py dev
9999

100100
Duplicate the `env.example` file and rename it to `.env`.
101101

102-
Obtain a Restack API Key to interact with the 'gpt-4o-mini' model at no cost from [Restack Cloud](https://console.restack.io/starter)
102+
Obtain a Restack API Key to interact with the 'gpt-4.1-mini' model at no cost from [Restack Cloud](https://console.restack.io/starter)
103103

104104
## Create a new Agent
105105

agent_telephony/vapi/agent_vapi/src/functions/llm_chat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ async def llm_chat(function_input: LlmChatInput) -> str:
4040
messages_dicts = [message.model_dump() for message in function_input.messages]
4141
# Get the streamed response from OpenAI API
4242
response: Stream[ChatCompletionChunk] = client.chat.completions.create(
43-
model=function_input.model or "gpt-4o-mini",
43+
model=function_input.model or "gpt-4.1-mini",
4444
messages=messages_dicts,
4545
stream=True,
4646
)

agent_todo/src/functions/llm_chat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ async def llm_chat(function_input: LlmChatInput) -> ChatCompletion:
5555
)
5656

5757
response = client.chat.completions.create(
58-
model=function_input.model or "gpt-4o-mini",
58+
model=function_input.model or "gpt-4.1-mini",
5959
messages=function_input.messages,
6060
tools=function_input.tools,
6161
)

agent_tool/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ python -c "from src.services import watch_services; watch_services()"
5151

5252
Duplicate the `env.example` file and rename it to `.env`.
5353

54-
Obtain a Restack API Key to interact with the 'gpt-4o-mini' model at no cost from [Restack Cloud](https://console.restack.io/starter)
54+
Obtain a Restack API Key to interact with the 'gpt-4.1-mini' model at no cost from [Restack Cloud](https://console.restack.io/starter)
5555

5656
## Run agents
5757

agent_tool/src/functions/llm_chat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ async def llm_chat(function_input: LlmChatInput) -> ChatCompletion:
5555
)
5656

5757
result = client.chat.completions.create(
58-
model=function_input.model or "gpt-4o-mini",
58+
model=function_input.model or "gpt-4.1-mini",
5959
messages=function_input.messages,
6060
tools=function_input.tools,
6161
)

agent_video/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ python -c "from src.services import watch_services; watch_services()"
5555

5656
Duplicate the `env.example` file and rename it to `.env`.
5757

58-
Obtain a Restack API Key to interact with the 'gpt-4o-mini' model at no cost from [Restack Cloud](https://console.restack.io/starter)
58+
Obtain a Restack API Key to interact with the 'gpt-4.1-mini' model at no cost from [Restack Cloud](https://console.restack.io/starter)
5959

6060
## Create Room and run Agent in parallel
6161

agent_video/src/functions/llm_chat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ async def llm_chat(function_input: LlmChatInput) -> str:
4040
messages_dicts = [message.model_dump() for message in function_input.messages]
4141
# Get the streamed response from OpenAI API
4242
response: Stream[ChatCompletionChunk] = client.chat.completions.create(
43-
model=function_input.model or "gpt-4o-mini",
43+
model=function_input.model or "gpt-4.1-mini",
4444
messages=messages_dicts,
4545
stream=True,
4646
)

agent_voice/livekit/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ In all subfolders, duplicate the `env.example` file and rename it to `.env`.
3434
- Sign up at [ElevenLabs](https://elevenlabs.io/docs/overview)
3535
- Add `ELEVENLABS_API_KEY` to .env file
3636

37-
Obtain a Restack API Key to interact with the 'gpt-4o-mini' model at no cost from [Restack Cloud](https://console.restack.io/starter)
37+
Obtain a Restack API Key to interact with the 'gpt-4.1-mini' model at no cost from [Restack Cloud](https://console.restack.io/starter)
3838

3939
## Start Restack
4040

agent_voice/livekit/agent/src/functions/llm_chat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ async def llm_chat(function_input: LlmChatInput) -> str:
4040
messages_dicts = [message.model_dump() for message in function_input.messages]
4141
# Get the streamed response from OpenAI API
4242
response: Stream[ChatCompletionChunk] = client.chat.completions.create(
43-
model=function_input.model or "gpt-4o-mini",
43+
model=function_input.model or "gpt-4.1-mini",
4444
messages=messages_dicts,
4545
stream=True,
4646
)

agent_voice/livekit/livekit_pipeline/src/pipeline.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ async def entrypoint(ctx: JobContext) -> None:
9595
vad=ctx.proc.userdata["vad"],
9696
stt=deepgram.STT(),
9797
llm=openai.LLM(
98-
# model="gpt-4o-mini",
98+
# model="gpt-4.1-mini",
9999
# api_key=os.environ.get("OPENAI_API_KEY"),
100100
api_key=f"{agent_id}-livekit",
101101
base_url=agent_url,

agent_voice/pipecat/pipecat_pipeline/src/pipeline.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ async def main() -> None:
5151
live_options=LiveOptions(vad_events=True, utterance_end_ms="1000"),
5252
)
5353

54-
llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY"), model="gpt-4o-mini")
54+
llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY"), model="gpt-4.1-mini")
5555

5656
tts = ElevenLabsTTSService(
5757
api_key=os.getenv("ELEVENLABS_API_KEY", ""),

audio_transcript/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[project]
22
name = "audio_transcript"
33
version = "0.0.1"
4-
description = "Transcribe audio with OpenAI Whisper and translate the text with OpenAI GPT-4o-mini"
4+
description = "Transcribe audio with OpenAI Whisper and translate the text with OpenAI gpt-4.1-mini"
55
authors = [{ name = "Restack Team", email = "[email protected]" }]
66
requires-python = ">=3.10,<3.14"
77
readme = "README.md"

audio_transcript/src/functions/translate_text.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ async def translate_text(input: TranslateTextInput):
2020

2121
try:
2222
response = client.chat.completions.create(
23-
model="gpt-4o-mini",
23+
model="gpt-4.1-mini",
2424
messages=[
2525
{
2626
"role": "system",

community/defense_quickstart_audio_transcription_translation/src/functions/translate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ async def translate(input: FunctionInputParams):
2323
print(messages)
2424
messages.append({"role": "system", "content": "To each output in the end add a line 'Helped By Restack AI'"})
2525
response = client.chat.completions.create(
26-
model="gpt-4o-mini",
26+
model="gpt-4.1-mini",
2727
messages=messages,
2828
temperature=0.0
2929
)

community/e2b/src/workflows/code_execution.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ async def run(self, input: CodeExecutionWorkflowInput) -> CodeExecutionWorkflowO
2121
messages = []
2222
while True:
2323
llm_response = await workflow.step(openai_tool_call, input=OpenaiToolCallInput(
24-
model="gpt-4o-mini",
24+
model="gpt-4.1-mini",
2525
user_content=input.user_content if not messages else None,
2626
system_content=input.system_content if not messages else None,
2727
messages=messages,

community/livekit_opentelemetry/src/pipeline.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ async def entrypoint(ctx: JobContext) -> None:
112112
vad=ctx.proc.userdata["vad"],
113113
stt=deepgram.STT(),
114114
llm=openai.LLM(
115-
# model="gpt-4o-mini",
115+
# model="gpt-4.1-mini",
116116
# api_key=os.environ.get("OPENAI_API_KEY"),
117117
api_key=f"{agent_id}-livekit",
118118
base_url=agent_url,

community/openai_greet/src/functions/function.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ async def openai_greet(input: FunctionInputParams) -> str:
2424
messages.append({"role": "user", "content": input.user_content})
2525

2626
response = client.chat.completions.create(
27-
model=input.model or "gpt-4o-mini",
27+
model=input.model or "gpt-4.1-mini",
2828
messages=messages,
2929
response_format={
3030
"json_schema": {

community/re_act/src/functions/decide.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ async def decide(input: DecideInput):
3939
]
4040

4141
response = client.chat.completions.create(
42-
model="gpt-4o-mini",
42+
model="gpt-4.1-mini",
4343
messages=[
4444
{
4545
"role": "system",

community/re_act/src/functions/generate_email_content.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ async def generate_email_content(input: GenerateEmailInput):
1717
client = OpenAI(api_key=os.environ.get("OPENAI_API_KEY"))
1818

1919
response = client.chat.completions.create(
20-
model="gpt-4o-mini",
20+
model="gpt-4.1-mini",
2121
messages=[
2222
{
2323
"role": "system",

pdf_ocr/src/functions/openai_chat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ async def openai_chat(input: OpenAiChatInput) -> str:
2828
messages.append({"role": "user", "content": input.user_content})
2929

3030
response = client.chat.completions.create(
31-
model=input.model or "gpt-4o-mini",
31+
model=input.model or "gpt-4.1-mini",
3232
messages=messages
3333
)
3434
log.info("openai_chat function completed", response=response)

pdf_ocr/src/workflows/pdf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ async def run(self, input: PdfWorkflowInput):
3434
function=openai_chat,
3535
function_input=OpenAiChatInput(
3636
user_content=f"Make a summary of that PDF. Here is the OCR result: {ocr_result}",
37-
model="gpt-4o-mini"
37+
model="gpt-4.1-mini"
3838
),
3939
start_to_close_timeout=timedelta(seconds=120)
4040
)

0 commit comments

Comments
 (0)