r/PoeAI • • Oct 26 '26

Sonnet 5.5 onto ScriptBot

Please add Sonnet 5.5 onto ScriptBot Thanks.

2 Upvotes

3 comments sorted by

1

u/RobooHood 27d ago

What do you mean? You can use this models via Script bot, API or prompt bot

1

u/tssphysicsboi1 21d ago

where do you select 5.5 under script bot?

1

u/RobooHood 17d ago edited 17d ago

You can use this as template:

import poe

from fastapi_poe.types import (

ParameterControls,

Section,

SettingsResponse,

Slider,

TextArea,

)

MODEL = "GLM-5.3-OSL"

poe.update_settings(SettingsResponse(

parameter_controls=ParameterControls(

sections=[

Section(

name="Custom script",

controls=[

TextArea(

label="System prompt (optional)",

description="Leave empty for no system prompt.",

parameter_name="custom_script",

default_value="",

placeholder="e.g. You are a pirate. Answer everything in pirate speak.",

),

],

),

Section(

name="Advanced",

collapsed_by_default=True,

controls=[

Slider(

label="Creativity (temperature x100)",

parameter_name="creativity",

default_value=70,

min_value=0,

max_value=100,

step=5,

),

],

),

]

),

))

if __name__ == "__main__":

params = poe.query.parameters or {}

script = (params.get("custom_script") or "").strip()

try:

temperature = float(params.get("creativity", 70)) / 100.0

except (TypeError, ValueError):

temperature = 0.7

temperature = max(0.0, min(1.0, temperature))

# Whole conversation so far; system prompt is added only if the user set one.

history = list(poe.default_chat)

if not history or history[-1].text != poe.query.text:

history.append(poe.query) # make sure the latest user message is included

if script:

chat = poe.Chat(poe.Message(text=script, sender="system"), *history)

else:

chat = poe.Chat(*history)

try:

with poe.start_message() as msg:

for part in poe.stream(MODEL, chat, temperature=temperature):

msg.update(part)

except Exception as e:

raise poe.BotError(f"Error calling {MODEL}: {e}")