API
- class ugly_bot.BotTag(value)
- CRON = 'cron'
cron
- MODERATOR = 'moderator'
moderator
- NEWS = 'news'
news
- VIDEO = 'video'
video
- WEB = 'web'
web
- class ugly_bot.Button(type: ButtonType, icon: Icon | None = None, text: str | None = None, lang: UserLang | None = None, func: str | None = None, uri: str | None = None, params: Dict[str, Any] | None = None, buttons: List[Button] | None = None, selected: bool | None = None, disabled: bool | None = None)
- class ugly_bot.ButtonType(value)
- BUTTON = 'button'
button
- LINK = 'link'
link
- MENU = 'menu'
menu
- TEXT = 'text'
text
- class ugly_bot.CodeFileCreateScope(value)
- ALL = 'all'
all
- CONVERSATION = 'conversation'
conversation
- PRIVATE = 'private'
private
- class ugly_bot.Conversation(id: str, type: ConversationType, title: str, context: str | None = None)
- class ugly_bot.ConversationType(value)
- BOT = 'bot'
bot
- GROUP = 'group'
group
- HUMAN = 'human'
human
- class ugly_bot.Emotion(neutral: int, happy: int, sad: int, angry: int, fearful: int, disgusted: int, surprised: int)
- class ugly_bot.File(id: str, user_id: str, type: FileType, title: str, text: str | None = None, image: Image | None = None, thumbnail: Image | None = None, markdown: str | None = None, uri: str | None = None, page: dict | None = None, tags: List[str] | None = None)
- class ugly_bot.FileChunk(file_id: str, text: str)
- class ugly_bot.FileType(value)
- AUDIO = 'audio'
audio
- IMAGE = 'image'
image
- LINK = 'link'
link
- MARKDOWN = 'markdown'
markdown
- PAGE = 'page'
page
- PDF = 'pdf'
pdf
- VIDEO = 'video'
video
- class ugly_bot.Icon(value)
- CHAT = 'chat'
chat
- FACEBOOK = 'facebook'
facebook
- IMAGE = 'image'
image
- INSTAGRAM = 'instagram'
instagram
- PINTEREST = 'pinterest'
pinterest
- SETTINGS = 'settings'
settings
- SNAPCHAT = 'snapchat'
snapchat
- THREADS = 'threads'
threads
- TIKTOK = 'tiktok'
tiktok
- WEB = 'web'
web
- WHATSAPP = 'whatsapp'
whatsapp
- X = 'x'
x
- YOUTUBE = 'youtube'
youtube
- class ugly_bot.Image(type: ImageType | None = None, width: int | None = None, height: int | None = None, base64: str | None = None, mime_type: ImageMimeType | None = None, uri: str | None = None, description: str | None = None, sizes: List[int] | None = None, file: str | None = None, buffer: bytes | None = None)
- class ugly_bot.ImageGenModel(value)
- FAL_FLUX_PRO = 'fal_flux_pro'
fal_flux_pro
- FIREWORKS_FLUX_PRO = 'fireworks_flux_pro'
fireworks_flux_pro
- FLUX_1_DEV = 'flux_1_dev'
flux_1_dev
- FLUX_1_PRO = 'flux_1_pro'
flux_1_pro
- GOOGLE_NANO_PRO = 'google_nano_pro'
google_nano_pro
- TOGETHER_FLUX_DEV = 'together_flux_dev'
together_flux_dev
- TOGETHER_FLUX_KONTEXT_MAX = 'together_flux_kontext_max'
together_flux_kontext_max
- TOGETHER_FLUX_KONTEXT_PRO = 'together_flux_kontext_pro'
together_flux_kontext_pro
- TOGETHER_FLUX_PRO = 'together_flux_pro'
together_flux_pro
- class ugly_bot.ImageGenSize(value)
- LANDSCAPE_16_9 = 'landscape_16_9'
landscape_16_9
- LANDSCAPE_21_9 = 'landscape_21_9'
landscape_21_9
- LANDSCAPE_4_3 = 'landscape_4_3'
landscape_4_3
- PORTRAIT_16_9 = 'portrait_16_9'
portrait_16_9
- PORTRAIT_21_9 = 'portrait_21_9'
portrait_21_9
- PORTRAIT_4_3 = 'portrait_4_3'
portrait_4_3
- SQUARE = 'square'
square
- class ugly_bot.ImageMimeType(value)
- GIF = 'image/gif'
image/gif
- JPG = 'image/jpeg'
image/jpeg
- PNG = 'image/png'
image/png
- WEBP = 'image/webp'
image/webp
- class ugly_bot.ImageType(value)
- BASE64 = 'base64'
base64
- PUBLIC = 'public'
public
- URI = 'uri'
uri
- class ugly_bot.KagiSearchItem(url: str, title: str, snippet: str, published: int | None = None, thumbnail: Image | dict | None = None)
- class ugly_bot.KagiSearchOutput(items: List[KagiSearchItem | dict], related: List[str] | None = None)
- class ugly_bot.MenuItem(func: str, title: str, params: Dict[str, Any] | None = None, checked: bool | None = None, enabled: bool | None = None)
- class ugly_bot.Message(id: str, created: int, user_id: str, text: str, is_bot: bool, markdown: str | None = None, system: bool | None = None, mention_user_ids: List[str] | None = None, lang: UserLang | None = None, only_user_ids: List[str] | None = None, visibility: MessageVisibility | None = None, color: MessageColor | None = None, buttons: List[Button] | None = None, mood: Mood | None = None, impersonate_user_id: str | None = None, file_ids: List[str] | None = None, context_file_id: str | None = None, parent_message_id: str | None = None, cache_text_to_speech: bool | None = None, transcribed: bool | None = None, body_html: str | None = None)
- class ugly_bot.MessageColor(value)
- ACCENT = 'accent'
accent
- ERROR = 'error'
error
- NOTICE = 'notice'
notice
- class ugly_bot.MessageVisibility(value)
- HIDDEN = 'hidden'
hidden
- NORMAL = 'normal'
normal
- SILENT = 'silent'
silent
- class ugly_bot.Mood(value)
- ANGRY = 'angry'
angry
- DISGUST = 'disgust'
disgust
- FEAR = 'fear'
fear
- HAPPY = 'happy'
happy
- LOVE = 'love'
love
- NEUTRAL = 'neutral'
neutral
- SAD = 'sad'
sad
- SLEEP = 'sleep'
sleep
- class ugly_bot.NewsArticle(title: str, content: str, uri: str | None)
- class ugly_bot.NewsCategory(value)
- AUTO = 'auto'
auto
- ENTERTAINMENT = 'entertainment'
entertainment
- FASHION = 'fashion'
fashion
- FOOD = 'food'
food
- GAMING = 'gaming'
gaming
- HEALTH = 'health'
health
- HOME = 'home'
home
- MUSIC = 'music'
music
- NEWS = 'news'
news
- SCIENCE = 'science'
science
- SPORTS = 'sports'
sports
- TECH = 'tech'
tech
- class ugly_bot.Padding(left: int, top: int, right: int, bottom: int)
- class ugly_bot.ProviderPriority(value)
- PERFORMANCE = 'performance'
performance
- PRICE = 'price'
price
- class ugly_bot.QueryFilesScope(value)
- ALL = 'all'
all
- BOT = 'bot'
bot
- CONVERSATION = 'conversation'
conversation
- PUBLIC = 'public'
public
- class ugly_bot.SearchArticle(title: str, synopsis: str, uri: str | None)
USearchArticlesSearchArticleer
- class ugly_bot.TextGenAbstractModel(value)
- DEEPSEEK_R1 = 'deepseek_r1'
deepseek_r1
- DEEPSEEK_V3 = 'deepseek_v3'
deepseek_v3
- DEEPSEEK_V3_1 = 'deepseek_v3_1'
deepseek_v3_1
- GPT_OSS_120B = 'gpt_oss_120b'
gpt_oss_120b
- GPT_OSS_20B = 'gpt_oss_20b'
gpt_oss_20b
- LLAMA_3_3_70B = 'llama_3_3_70b'
llama_3_3_70b
- LLAMA_4_MAVERICK = 'llama_4_maverick'
llama_4_maverick
- LLAMA_4_SCOUT = 'llama_4_scout'
llama_4_scout
- class ugly_bot.TextGenMessage(role: TextGenRole, content: str | List[str | Image])
- class ugly_bot.TextGenModel(value)
- ANTHROPHIC_CLAUDE_3_HAIKU = 'anthrophic_claude_3_haiku'
anthrophic_claude_3_haiku
- ANTHROPHIC_CLAUDE_3_SONNET = 'anthrophic_claude_3_sonnet'
anthrophic_claude_3_sonnet
- DEEPSEEK_R1 = 'deepseek_r1'
deepseek_r1
- DEEPSEEK_V3 = 'deepseek_v3'
deepseek_v3
- DEEPSEEK_V3_1 = 'deepseek_v3_1'
deepseek_v3_1
- FIREWORKS_DEEPSEEK_V3 = 'fireworks_deepseek_v3'
fireworks_deepseek_v3
- FIREWORKS_DEEPSEEK_V3_1 = 'fireworks_deepseek_v3_1'
fireworks_deepseek_v3_1
- FIREWORKS_GPT_OSS_120B = 'fireworks_gpt_oss_120b'
fireworks_gpt_oss_120b
- FIREWORKS_GPT_OSS_20B = 'fireworks_gpt_oss_20b'
fireworks_gpt_oss_20b
- GOOGLE_GEMINI_2_5 = 'google_gemini_2_5'
google_gemini_2_5
- GOOGLE_GEMINI_2_5_FLASH = 'google_gemini_2_5_flash'
google_gemini_2_5_flash
- GPT_OSS_120B = 'gpt_oss_120b'
gpt_oss_120b
- GPT_OSS_20B = 'gpt_oss_20b'
gpt_oss_20b
- GROQ_GPT_OSS_120B = 'groq_gpt_oss_120b'
groq_gpt_oss_120b
- GROQ_GPT_OSS_20B = 'groq_gpt_oss_20b'
groq_gpt_oss_20b
- GROQ_LLAMA_3_3_70B = 'groq_llama_3_3_70b'
groq_llama_3_3_70b
- GROQ_LLAMA_4_MAVERICK = 'groq_llama_4_maverick'
groq_llama_4_maverick
- GROQ_MIXTRAL_8X7B = 'groq_mixtral_8x7b'
groq_mixtral_8x7b
- LLAMA_3_3_70B = 'llama_3_3_70b'
llama_3_3_70b
- LLAMA_4_MAVERICK = 'llama_4_maverick'
llama_4_maverick
- OPENAI_GPT_4O = 'openai_gpt_4o'
openai_gpt_4o
- OPENAI_GPT_5_MINI = 'openai_gpt_5_mini'
openai_gpt_5_mini
- OPENAI_O1 = 'openai_o1'
openai_o1
- OPENAI_O1_MINI = 'openai_o1_mini'
openai_o1_mini
- PERPLEXITY_LLAMA_3_SONAR_HUGE_128K_ONLINE = 'perplexity_llama_3_sonar_huge_128k_online'
perplexity_llama_3_sonar_huge_128k_online
- PERPLEXITY_LLAMA_3_SONAR_LARGE_128K_ONLINE = 'perplexity_llama_3_sonar_large_128k_online'
perplexity_llama_3_sonar_large_128k_online
- TOGETHER_DEEPSEEK_R1 = 'together_deepseek_r1'
together_deepseek_r1
- TOGETHER_DEEPSEEK_V3 = 'together_deepseek_v3'
together_deepseek_v3
- TOGETHER_DEEPSEEK_V3_1 = 'together_deepseek_v3_1'
together_deepseek_v3_1
- TOGETHER_KIMI_K2 = 'together_kimi_k2'
together_kimi_k2
- TOGETHER_META_LLAMA4_400B = 'together_meta_llama4_400b'
together_meta_llama4_400b
- TOGETHER_QWEN2_72B = 'together_qwen2_72b'
together_qwen2_72b
- TOGETHER_QWEN2_VISION_72B = 'together_qwen2_vision_72b'
together_qwen2_vision_72b
- TOGETHER_QWEN3_235B = 'together_qwen3_235b'
together_qwen3_235b
- class ugly_bot.TextGenTool(name: str, description: str, parameters: Dict[str, Any] | None = None)
- class ugly_bot.Timezone(value)
- AFRICA_ALGIERS = 'Africa/Algiers'
Africa/Algiers
- AFRICA_CAIRO = 'Africa/Cairo'
Africa/Cairo
- AFRICA_CASABLANCA = 'Africa/Casablanca'
Africa/Casablanca
- AFRICA_HARARE = 'Africa/Harare'
Africa/Harare
- AFRICA_NAIROBI = 'Africa/Nairobi'
Africa/Nairobi
- AMERICA_ARGENTINA_BUENOS_AIRES = 'America/Argentina/Buenos_Aires'
America/Argentina/Buenos_Aires
- AMERICA_BELIZE = 'America/Belize'
America/Belize
- AMERICA_BOGOTA = 'America/Bogota'
America/Bogota
- AMERICA_BOISE = 'America/Boise'
America/Boise
- AMERICA_CARACAS = 'America/Caracas'
America/Caracas
- AMERICA_CHICAGO = 'America/Chicago'
America/Chicago
- AMERICA_CHIHUAHUA = 'America/Chihuahua'
America/Chihuahua
- AMERICA_DAWSON = 'America/Dawson'
America/Dawson
- AMERICA_DETROIT = 'America/Detroit'
America/Detroit
- AMERICA_GODTHAB = 'America/Godthab'
America/Godthab
- AMERICA_JUNEAU = 'America/Juneau'
America/Juneau
- AMERICA_LOS_ANGELES = 'America/Los_Angeles'
America/Los_Angeles
- AMERICA_MEXICO_CITY = 'America/Mexico_City'
America/Mexico_City
- AMERICA_MONTEVIDEO = 'America/Montevideo'
America/Montevideo
- AMERICA_PHOENIX = 'America/Phoenix'
America/Phoenix
- AMERICA_REGINA = 'America/Regina'
America/Regina
- AMERICA_SANTIAGO = 'America/Santiago'
America/Santiago
- AMERICA_SAO_PAULO = 'America/Sao_Paulo'
America/Sao_Paulo
- AMERICA_ST_JOHNS = 'America/St_Johns'
America/St_Johns
- AMERICA_TIJUANA = 'America/Tijuana'
America/Tijuana
- ASIA_ALMATY = 'Asia/Almaty'
Asia/Almaty
- ASIA_BAGHDAD = 'Asia/Baghdad'
Asia/Baghdad
- ASIA_BAKU = 'Asia/Baku'
Asia/Baku
- ASIA_BANGKOK = 'Asia/Bangkok'
Asia/Bangkok
- ASIA_COLOMBO = 'Asia/Colombo'
Asia/Colombo
- ASIA_DHAKA = 'Asia/Dhaka'
Asia/Dhaka
- ASIA_DUBAI = 'Asia/Dubai'
Asia/Dubai
- ASIA_IRKUTSK = 'Asia/Irkutsk'
Asia/Irkutsk
- ASIA_JERUSALEM = 'Asia/Jerusalem'
Asia/Jerusalem
- ASIA_KABUL = 'Asia/Kabul'
Asia/Kabul
- ASIA_KAMCHATKA = 'Asia/Kamchatka'
Asia/Kamchatka
- ASIA_KARACHI = 'Asia/Karachi'
Asia/Karachi
- ASIA_KATHMANDU = 'Asia/Kathmandu'
Asia/Kathmandu
- ASIA_KOLKATA = 'Asia/Kolkata'
Asia/Kolkata
- ASIA_KRASNOYARSK = 'Asia/Krasnoyarsk'
Asia/Krasnoyarsk
- ASIA_KUALA_LUMPUR = 'Asia/Kuala_Lumpur'
Asia/Kuala_Lumpur
- ASIA_KUWAIT = 'Asia/Kuwait'
Asia/Kuwait
- ASIA_MAGADAN = 'Asia/Magadan'
Asia/Magadan
- ASIA_RANGOON = 'Asia/Rangoon'
Asia/Rangoon
- ASIA_SEOUL = 'Asia/Seoul'
Asia/Seoul
- ASIA_SHANGHAI = 'Asia/Shanghai'
Asia/Shanghai
- ASIA_TAIPEI = 'Asia/Taipei'
Asia/Taipei
- ASIA_TEHRAN = 'Asia/Tehran'
Asia/Tehran
- ASIA_TOKYO = 'Asia/Tokyo'
Asia/Tokyo
- ASIA_VLADIVOSTOK = 'Asia/Vladivostok'
Asia/Vladivostok
- ASIA_YAKUTSK = 'Asia/Yakutsk'
Asia/Yakutsk
- ASIA_YEKATERINBURG = 'Asia/Yekaterinburg'
Asia/Yekaterinburg
- ATLANTIC_AZORES = 'Atlantic/Azores'
Atlantic/Azores
- ATLANTIC_CANARY = 'Atlantic/Canary'
Atlantic/Canary
- ATLANTIC_CAPE_VERDE = 'Atlantic/Cape_Verde'
Atlantic/Cape_Verde
- AUSTRALIA_ADELAIDE = 'Australia/Adelaide'
Australia/Adelaide
- AUSTRALIA_BRISBANE = 'Australia/Brisbane'
Australia/Brisbane
- AUSTRALIA_DARWIN = 'Australia/Darwin'
Australia/Darwin
- AUSTRALIA_HOBART = 'Australia/Hobart'
Australia/Hobart
- AUSTRALIA_PERTH = 'Australia/Perth'
Australia/Perth
- AUSTRALIA_SYDNEY = 'Australia/Sydney'
Australia/Sydney
- EUROPE_AMSTERDAM = 'Europe/Amsterdam'
Europe/Amsterdam
- EUROPE_ATHENS = 'Europe/Athens'
Europe/Athens
- EUROPE_BELGRADE = 'Europe/Belgrade'
Europe/Belgrade
- EUROPE_BRUSSELS = 'Europe/Brussels'
Europe/Brussels
- EUROPE_BUCHAREST = 'Europe/Bucharest'
Europe/Bucharest
- EUROPE_DUBLIN = 'Europe/Dublin'
Europe/Dublin
- EUROPE_HELSINKI = 'Europe/Helsinki'
Europe/Helsinki
- EUROPE_LISBON = 'Europe/Lisbon'
Europe/Lisbon
- EUROPE_LONDON = 'Europe/London'
Europe/London
- EUROPE_MOSCOW = 'Europe/Moscow'
Europe/Moscow
- EUROPE_SARAJEVO = 'Europe/Sarajevo'
Europe/Sarajevo
- PACIFIC_AUCKLAND = 'Pacific/Auckland'
Pacific/Auckland
- PACIFIC_FIJI = 'Pacific/Fiji'
Pacific/Fiji
- PACIFIC_GUAM = 'Pacific/Guam'
Pacific/Guam
- PACIFIC_HONOLULU = 'Pacific/Honolulu'
Pacific/Honolulu
- PACIFIC_MIDWAY = 'Pacific/Midway'
Pacific/Midway
- PACIFIC_TONGATAPU = 'Pacific/Tongatapu'
Pacific/Tongatapu
- UTC = 'UTC'
UTC
- class ugly_bot.User(id: str, name: str, bio: str, avatar: Avatar, voice_id: str | None, birthday: int | None, type: str, lang: UserLang, timezone: Timezone)
- class ugly_bot.UserLang(value)
- AR = 'ar'
ar
- DE = 'de'
de
- EN = 'en'
en
- ES = 'es'
es
- FR = 'fr'
fr
- JA = 'ja'
ja
- PSEUDO = 'pseudo'
pseudo
- ZH = 'zh'
zh
- class ugly_bot.WebPageData(html: str, url: str, title: str)
- ugly_bot.bot_owners_get(id: str) List[str]
Get owners of a bot
- ugly_bot.conversation_bots(tag: BotTag | None = None) List[Bot]
Get bots in the active conversation
- ugly_bot.conversation_buttons_show(user_id: str | None = None, buttons: List[Button] | None = None) None
Show buttons in the active conversation
Add context menu to the current web page when this conversation is active
- ugly_bot.conversation_cron_extend(end: int | None = None) None
Extends the end of cron jobs for this conversation
- ugly_bot.conversation_get(id: str | None = None) Conversation | None
Get conversation by ID
- ugly_bot.conversation_users(type: str | None = None, role: str | None = None) List[User]
Get users in the active conversation
- ugly_bot.data_get() SimpleNamespace
Get bot data for conversation
- ugly_bot.data_set(**kwargs) SimpleNamespace
Set bot data for conversation
- ugly_bot.email_send(user_id: str | None = None, user_ids: List[str] | None = None, subject: str | None = None, text: str | None = None, markdown: str | None = None, file_id: str | None = None) None
Send an email to a user or multiple users
- ugly_bot.error(*args: Any) None
Log an error
- ugly_bot.export(name: str)
Decorator to export functions from your bot
- ugly_bot.file_create(type: FileType | None = None, title: str | None = None, markdown: str | None = None, uri: str | None = None, thumbnail: Image | None = None, indexable: bool | None = None, lang: UserLang | None = None, scope: CodeFileCreateScope | None = None, page: dict | None = None, tags: List[str] | None = None) File
Create a new file
- ugly_bot.file_to_text_gen_message(file: File, role: TextGenRole | None = None, include_name: bool | None = None, text: str | None = None) TextGenMessage
Convert a file to TextGenMessage, this is useful if you need to pass file into text_gen
- ugly_bot.file_update(id: str | None = None, title: str | None = None, markdown: str | None = None, thumbnail: Image | None = None, ui: dict | None = None) None
Update an existing file
- ugly_bot.google_search(query: str | None = None) List[SearchArticle]
Search the web using Google
- ugly_bot.image_gen(model: ImageGenModel | None = None, priority: ProviderPriority | None = None, prompt: str | None = None, negative_prompt: str | None = None, size: str | None = None, guidance_scale: int | None = None, steps: int | None = None, image: Image | None = None, images: List[Image | None] | None = None, image_strength: int | None = None, allow_sexual: bool | None = None) Image | None
Generate an image using specified model. Use priority=”price” (default) for cheapest provider or “performance” for fastest.
- ugly_bot.kagi_enrich_news(query: str)
Kagi Enrich News
- ugly_bot.kagi_enrich_web(query: str)
Kagi Enrich Web
- ugly_bot.kagi_search(query: str, limit: int | None = None)
Kagi Search
- ugly_bot.kagi_summarize(url: str | None = None, text: str | None = None)
Kagi Summarize
- ugly_bot.log(*args: Any) None
Log, this works the same as print
- ugly_bot.markdown_create_image(file_id: str, image: Image) str
Convert an image into markdown syntax, this will upload the file if it is base64
- ugly_bot.message_continue(message: Message) None
Continue a message to the active conversation, only used by moderator bots
- ugly_bot.message_delete(id: str | None = None) None
Delete an existing message
- ugly_bot.message_edit(id: str | None = None, text: str | None = None, markdown: str | None = None) Message
Edit an existing message
- ugly_bot.message_history(duration: int | None = None, limit: int | None = None, start: int | None = None, include_hidden: bool | None = None) List[Message]
Get messages from the active conversation
- ugly_bot.message_send(id: str | None = None, text: str | None = None, image: Image | None = None, images: List[Image | None] | None = None, markdown: str | None = None, mention_user_ids: List[str] | None = None, only_user_ids: List[str] | None = None, lang: UserLang | None = None, visibility: MessageVisibility | None = None, color: MessageColor | None = None, buttons: List[Button] | None = None, mood: Mood | None = None, impersonate_user_id: str | None = None, files: List[File] | None = None, file_ids: List[str] | None = None, parent_message_id: str | None = None) Message
Send a message to the active conversation
- ugly_bot.message_send_all(text: str | None = None, image: Image | None = None, images: List[Image] | None = None, markdown: str | None = None, lang: UserLang | None = None, visibility: MessageVisibility | None = None, color: MessageColor | None = None, buttons: List[Button] | None = None, mood: Mood | None = None, files: List[File] | None = None) None
Send a message to all conversations
- ugly_bot.message_typing(parent_message_id: str | None = None, future_message_id: str | None = None) None
Show a typing indicator in the active conversation
- ugly_bot.messages_to_text(messages: List[Message], strip_names: bool | None = None) str
Convert a list of messages into string, useful if you need to add your conversation history to an LLM prompt
- ugly_bot.query_files(query: str | None = None, scope: QueryFilesScope | None = None, catalog_ids: List[str] | None = None, tags: List[str] | None = None, limit: int | None = None) List[FileChunk]
Get files based on semantic search using the query
- ugly_bot.query_news(query: str | None = None, created: int | None = None, limit: int | None = None, categories: List[NewsCategory] | None = None) List[NewsArticle]
Get news based on semantic search using the query
- ugly_bot.start()
Start your bot, this runs the event loop so your bot can receive calls
- ugly_bot.start_nonblocking()
Start your bot, this start an async loop to handle future calls
- ugly_bot.text_gen(question: str | None = None, instruction: str | None = None, messages: List[TextGenMessage | Message] | None = None, model: TextGenModel | None = None, abstract_model: TextGenAbstractModel | None = None, priority: ProviderPriority | None = None, routing_priority: ProviderPriority | None = None, temperature: int | None = None, top_k: int | None = None, top_p: int | None = None, max_tokens: int | None = None, frequency_penalty: int | None = None, presence_penalty: int | None = None, repetition_penalty: int | None = None, tools: List[TextGenTool] | None = None, include_files: bool | None = None, json: dict | None = None) str | None
Generate text using the specified model (LLM). Use priority=”price” (default) for cheapest provider or “performance” for fastest.
- ugly_bot.tool_conversation_show(session_id: str, video_call_enabled: bool | None = None) None
Open a conversation
- ugly_bot.user_data_get(user_id: str) SimpleNamespace
Get bot data for specified user
- ugly_bot.user_data_set(user_id: str, **kwargs) SimpleNamespace
Set bot data for specified user
- ugly_bot.web_page_get(session_id: str) WebPageData
Get active web page, this only works when Ugly is being used a sidePanel in Chrome
- ugly_bot.bot.bot_params = None
- ugly_bot.bot.bot_id = None
- ugly_bot.bot.conversation_id = None