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', 'recorder_to_html_file', 'recorder_to_json_file', 'recorder_to_markdown_file']
module-attribute
BaseIntel
Bases: BaseModel
, ABC
check_inc_ex
classmethod
Source code in dandy/intel/intel.py
model_to_kwargs
model_inc_ex_class_copy
classmethod
Source code in dandy/intel/intel.py
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 |
|
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
dataclass
Bases: BaseProcessor
, LlmServiceMixin
, HttpServiceMixin
, IntelServiceMixin
, VisionProcessorMixin
services = BotService()
class-attribute
description = 'Base Dandy Bot Class That Can Do Anything'
class-attribute
instance-attribute
Agent
dataclass
Bases: BaseProcessor
, LlmServiceMixin
, HttpServiceMixin
, IntelServiceMixin
, VisionProcessorMixin
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 = (Bot,)
class-attribute
instance-attribute
services = AgentService()
class-attribute
__init_subclass__
Source code in dandy/processor/agent/agent.py
__post_init__
process
Source code in dandy/processor/agent/agent.py
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 |
|
DandyException
Bases: Exception
DandyRecoverableException
Bases: DandyException
DandyCriticalException
Bases: DandyException
Decoder
dataclass
Bases: BaseProcessor
, LlmServiceMixin
mapping_keys_description = None
class-attribute
instance-attribute
mapping = 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
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
divider
array
array_random_order
file
Source code in dandy/llm/prompt/prompt.py
heading
line_break
list
intel
intel_schema
Source code in dandy/llm/prompt/prompt.py
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
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 = dict()
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