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
6 changes: 3 additions & 3 deletions jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,9 +401,9 @@ def post_weekly_changelog():
try:
changelog_data = get_chat_function_call(
instructions,
input_text,
function_spec,
"generate_changelog",
user_input=input_text,
functions=function_spec,
function_call_name="generate_changelog",
)
except Exception as e:
logging.error(
Expand Down
4 changes: 2 additions & 2 deletions openai_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@


def get_chat_function_call(
instructions, input, functions, function_call_name, model="gpt-4o", temperature=0.2
instructions, user_input, functions, function_call_name, model="gpt-4o", temperature=0.2
):
"""Call OpenAI chat completion with function calling and return the parsed JSON arguments."""
# Ensure functions is a list of function specifications
Expand All @@ -20,7 +20,7 @@ def get_chat_function_call(
model=model,
messages=[
{"role": "system", "content": instructions},
{"role": "user", "content": input},
{"role": "user", "content": user_input},
],
functions=functions,
function_call={"name": function_call_name},
Expand Down