ChatWidget
Object Hierarchy:
Description:
public class ChatWidget : Box
Reusable chat widget that can be embedded anywhere in the project.
This widget provides a complete chat interface with markdown rendering and streaming support. The caller must pass an OLLMchat.Client
instance to the constructor.
Since:
1.0
Content:
Properties:
Creation methods:
Methods:
- public void clear_chat ()
Clears the chat history.
- public async void load_session (SessionBase session) throws Error
Loads a history session into the chat widget.
- public void send_message (string text)
Sends a message programmatically.
- public async void start_new_chat_with_text (string text)
Starts a new chat with the given text in the input field.
- public async void switch_to_session (SessionBase session)
Switches to a new session, deactivating the current one and activating
the new one.
- public async void update_models ()
Updates the model list in the dropdown.
Signals:
- public signal void error_occurred (string error)
Emitted when an error occurs during chat operations.
- public signal void message_sent (string text)
Emitted when a message is sent by the user.
- public signal void response_received (string text)
Emitted when a response is received from the assistant.
Inherited Members:
All known members inherited from class Gtk.Box
- append
- baseline_child
- baseline_position
- get_baseline_child
- get_baseline_position
- get_homogeneous
- get_spacing
- homogeneous
- insert_child_after
- prepend
- remove
- reorder_child_after
- set_baseline_child
- set_baseline_position
- set_homogeneous
- set_spacing
- spacing
All known members inherited from class Gtk.Widget
All known members inherited from class GLib.Object
- @get
- @new
- @ref
- @set
- add_toggle_ref
- add_weak_pointer
- bind_property
- connect
- constructed
- disconnect
- dispose
- dup_data
- dup_qdata
- force_floating
- freeze_notify
- get_class
- get_data
- get_property
- get_qdata
- get_type
- getv
- interface_find_property
- interface_install_property
- interface_list_properties
- is_floating
- new_valist
- new_with_properties
- newv
- notify
- notify_property
- ref_count
- ref_sink
- remove_toggle_ref
- remove_weak_pointer
- replace_data
- replace_qdata
- set_data
- set_data_full
- set_property
- set_qdata
- set_qdata_full
- set_valist
- setv
- steal_data
- steal_qdata
- thaw_notify
- unref
- watch_closure
- weak_ref
- weak_unref
All known members inherited from interface Gtk.Accessible
- accessible_role
- announce
- get_accessible_parent
- get_accessible_role
- get_at_context
- get_bounds
- get_first_accessible_child
- get_next_accessible_sibling
- get_platform_state
- reset_property
- reset_relation
- reset_state
- set_accessible_parent
- update_next_accessible_sibling
- update_property
- update_property_value
- update_relation
- update_relation_value
- update_state
- update_state_value
All known members inherited from interface Gtk.Buildable
- add_child
- custom_finished
- custom_tag_end
- custom_tag_start
- get_buildable_id
- get_id
- get_internal_child
- parser_finished
- set_buildable_property
- set_id
All known members inherited from interface Gtk.Orientable