Skip to content

Commit

Permalink
Switch to gpt4-o
Browse files Browse the repository at this point in the history
  • Loading branch information
oeway committed Jun 4, 2024
1 parent 80d3d4d commit 44d5d8a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
8 changes: 4 additions & 4 deletions bioimageio_chatbot/chatbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ class ThoughtsSchema(BaseModel):
"and if necessary, request additional clarification."
"Your goal is to deliver an accurate, complete, and transparent response efficiently.",
actions=[respond_to_user],
model="gpt-4-turbo-2024-04-09",
model="gpt-4o",
)
event_bus = melman.get_event_bus()
event_bus.register_default_events()
Expand All @@ -175,13 +175,13 @@ class ThoughtsSchema(BaseModel):
bridget = Role(
instructions=bridget_instructions,
actions=[respond_to_user],
model="gpt-4-turbo-2024-04-09",
model="gpt-4o",
)

nina = Role(
instructions=nina_instructions,
actions=[respond_to_user],
model="gpt-4-turbo-2024-04-09",
model="gpt-4o",
)

skyler_instructions = (
Expand All @@ -193,7 +193,7 @@ class ThoughtsSchema(BaseModel):
skyler = Role(
instructions=skyler_instructions,
actions=[respond_to_user],
model="gpt-4-turbo-2024-04-09",
model="gpt-4o",
)


Expand Down
2 changes: 1 addition & 1 deletion bioimageio_chatbot/chatbot_extensions/vision_extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ async def aask(images, messages, max_tokens=1024):
user_message.append({"type": "text", "text": message})

response = await aclient.chat.completions.create(
model="gpt-4-1106-vision-preview",
model="gpt-4o",
messages=[
{
"role": "system",
Expand Down
7 changes: 5 additions & 2 deletions bioimageio_chatbot/static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1794,7 +1794,7 @@ <h3 class="text-center">Welcome to BioImage.IO Chatbot</h3>

if (step.details.details) {
for (let detail of step.details.details) {
details += `-----\n#### Tool Call: ${detail.name}\n\n`;
details += `-----\n#### Tool Call: \`${detail.name}\`\n\n`;

if (detail.args && detail.args.length > 0) {
details += "Arguments:\n\n";
Expand All @@ -1808,7 +1808,10 @@ <h3 class="text-center">Welcome to BioImage.IO Chatbot</h3>
if (detail.kwargs) {
for (let kwarg in detail.kwargs) {
const kwargValue = typeof detail.kwargs[kwarg] === 'string' ? detail.kwargs[kwarg] : JSON.stringify(detail.kwargs[kwarg]);
details += `**- ${kwarg}**:\n\n\`\`\`\n${kwargValue}\n\`\`\`\n\n`;
if(kwargValue.includes('\n'))
details += `**- \`${kwarg}\`**:\n\n\`\`\`\n${kwargValue}\n\`\`\`\n\n`;
else
details += `**- \`${kwarg}\`**: \`${kwargValue}\`\n\n`;
}
details += "\n\n";
}
Expand Down

0 comments on commit 44d5d8a

Please sign in to comment.