dandy
dandy
__all__ = ['BaseIntel', 'BaseListIntel', 'Bot', 'DandyCriticalError', 'DandyError', 'DandyRecoverableError', 'MemoryCache', 'Prompt', 'Recorder', 'SqliteCache', 'cache_to_memory', 'cache_to_sqlite', 'generate_cache_key', 'process_to_future', 'recorder_to_html_file', 'recorder_to_json_file', 'recorder_to_markdown_file']
module-attribute
BaseIntel
Bases: BaseModel, ABC
create_from_file
classmethod
model_to_kwargs
model_inc_ex_class_copy
classmethod
Source code in dandy/intel/intel.py
model_json_inc_ex_schema
classmethod
model_object_json_inc_ex_schema
model_validate_and_copy
model_validate_json_and_copy
BaseListIntel
Bases: BaseIntel, ABC, Generic[T]
model_post_init
Source code in dandy/intel/intel.py
__getitem__
__iter__
__len__
__setitem__
append
Bot
Bases: FileServiceMixin, LlmServiceMixin, HttpServiceMixin, IntelServiceMixin
Source code in dandy/bot/bot.py
recorder_event_id = ''
instance-attribute
__init_subclass__
Source code in dandy/bot/bot.py
get_description
classmethod
process
Source code in dandy/bot/bot.py
process_to_future
DandyError
Bases: Exception
DandyRecoverableError
Bases: DandyError
DandyCriticalError
Bases: DandyError
MemoryCache
Bases: BaseCache
cache_name
instance-attribute
limit
instance-attribute
__len__
get
set
clean
clear
classmethod
clear_all
classmethod
Prompt
dataclass
input = (None,)
class-attribute
instance-attribute
tag = (None,)
class-attribute
instance-attribute
estimated_token_count
property
__post_init__
__str__
to_str
dict
directory_list
Source code in dandy/llm/prompt/prompt.py
divider
array
array_random_order
file
Source code in dandy/llm/prompt/prompt.py
heading
line_break
list
intel
intel_schema
module_source
Source code in dandy/llm/prompt/prompt.py
object_source
Source code in dandy/llm/prompt/prompt.py
ordered_list
prompt
random_choice
sub_heading
text
Source code in dandy/llm/prompt/prompt.py
title
unordered_list
unordered_random_list
Source code in dandy/llm/prompt/prompt.py
Recorder
Bases: Singleton
recordings = {}
class-attribute
instance-attribute
renderers = {'html': HtmlRecordingRenderer, 'json': JsonRecordingRenderer, 'markdown': MarkdownRecordingRenderer}
class-attribute
instance-attribute
add_event
classmethod
check_recording_is_valid
classmethod
Source code in dandy/recorder/recorder.py
delete_all_recordings
classmethod
delete_recording
classmethod
get_recording
classmethod
is_recording
classmethod
start_recording
classmethod
stop_recording
classmethod
stop_all_recording
classmethod
to_file
classmethod
to_html_file
classmethod
to_html_str
classmethod
to_json_file
classmethod
to_json_str
classmethod
to_markdown_file
classmethod
SqliteCache
Bases: BaseCache