dandy
dandy
__all__ = ['Agent', 'BaseIntel', 'BaseListIntel', 'Bot', 'DandyCriticalException', 'DandyException', 'DandyRecoverableException', 'Decoder', 'LlmConfigOptions', '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
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
BaseListIntel
Bases: BaseIntel, ABC, Generic[T]
model_post_init
Source code in dandy/intel/intel.py
__getitem__
__iter__
__len__
__setitem__
append
Bot
Bases: BaseProcessor, BotServiceMixin, LlmServiceMixin, HttpServiceMixin, IntelServiceMixin, VisionServiceMixin
Source code in dandy/processor/bot/bot.py
description = 'Generic Bot for performing generic tasks'
class-attribute
instance-attribute
get_description
classmethod
process
Source code in dandy/processor/bot/bot.py
Agent
Bases: BaseProcessor, AgentServiceMixin, LlmServiceMixin, HttpServiceMixin, IntelServiceMixin, VisionServiceMixin
Source code in dandy/processor/agent/agent.py
plan_time_limit_seconds = settings.AGENT_DEFAULT_PLAN_TIME_LIMIT_SECONDS
class-attribute
instance-attribute
plan_task_count_limit = settings.AGENT_DEFAULT_PLAN_TASK_COUNT_LIMIT
class-attribute
instance-attribute
processors = (GenericTaskBot,)
class-attribute
instance-attribute
services = AgentService()
class-attribute
__init_subclass__
Source code in dandy/processor/agent/agent.py
__post_init__
get_description
classmethod
process
Source code in dandy/processor/agent/agent.py
DandyException
Bases: Exception
DandyRecoverableException
Bases: DandyException
DandyCriticalException
Bases: DandyException
Decoder
Bases: BaseProcessor, DecoderServiceMixin, LlmServiceMixin
Source code in dandy/processor/decoder/decoder.py
mapping = None
class-attribute
instance-attribute
mapping_keys_description = None
class-attribute
instance-attribute
services = DecoderService()
class-attribute
__init_subclass__
Source code in dandy/processor/decoder/decoder.py
__post_init__
Source code in dandy/processor/decoder/decoder.py
__getitem__
as_enum
get_description
classmethod
process
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
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
LlmConfigOptions
Source code in dandy/llm/config/options.py
seed
property
randomize_seed
property
max_input_tokens
property
max_output_tokens
property
temperature
property
prompt_retry_count
property
update_values
merge_to_copy
Merges the current instance with another secondary instance Current instance attributes that are not none will take precedence over the secondary instance
Source code in dandy/llm/config/options.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