symbolicai 1.5.0__py3-none-any.whl → 1.6.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- symai/__init__.py +21 -71
- symai/backend/base.py +0 -26
- symai/backend/engines/drawing/engine_gemini_image.py +101 -0
- symai/backend/engines/embedding/engine_openai.py +11 -8
- symai/backend/engines/neurosymbolic/__init__.py +8 -0
- symai/backend/engines/neurosymbolic/engine_google_geminiX_reasoning.py +14 -1
- symai/backend/engines/neurosymbolic/engine_openrouter.py +294 -0
- symai/backend/mixin/__init__.py +4 -0
- symai/backend/mixin/openrouter.py +2 -0
- symai/components.py +203 -13
- symai/extended/interfaces/nanobanana.py +23 -0
- symai/interfaces.py +2 -0
- symai/ops/primitives.py +0 -18
- symai/shellsv.py +2 -7
- {symbolicai-1.5.0.dist-info → symbolicai-1.6.0.dist-info}/METADATA +2 -9
- {symbolicai-1.5.0.dist-info → symbolicai-1.6.0.dist-info}/RECORD +20 -43
- {symbolicai-1.5.0.dist-info → symbolicai-1.6.0.dist-info}/WHEEL +1 -1
- symai/backend/driver/webclient.py +0 -217
- symai/backend/engines/crawler/engine_selenium.py +0 -94
- symai/backend/engines/drawing/engine_dall_e.py +0 -131
- symai/backend/engines/embedding/engine_plugin_embeddings.py +0 -12
- symai/backend/engines/experiments/engine_bard_wrapper.py +0 -131
- symai/backend/engines/experiments/engine_gptfinetuner.py +0 -32
- symai/backend/engines/experiments/engine_llamacpp_completion.py +0 -142
- symai/backend/engines/neurosymbolic/engine_openai_gptX_completion.py +0 -277
- symai/collect/__init__.py +0 -8
- symai/collect/dynamic.py +0 -117
- symai/collect/pipeline.py +0 -156
- symai/collect/stats.py +0 -434
- symai/extended/crawler.py +0 -21
- symai/extended/interfaces/selenium.py +0 -18
- symai/extended/interfaces/vectordb.py +0 -21
- symai/extended/personas/__init__.py +0 -3
- symai/extended/personas/builder.py +0 -105
- symai/extended/personas/dialogue.py +0 -126
- symai/extended/personas/persona.py +0 -154
- symai/extended/personas/research/__init__.py +0 -1
- symai/extended/personas/research/yann_lecun.py +0 -62
- symai/extended/personas/sales/__init__.py +0 -1
- symai/extended/personas/sales/erik_james.py +0 -62
- symai/extended/personas/student/__init__.py +0 -1
- symai/extended/personas/student/max_tenner.py +0 -51
- symai/extended/strategies/__init__.py +0 -1
- symai/extended/strategies/cot.py +0 -40
- {symbolicai-1.5.0.dist-info → symbolicai-1.6.0.dist-info}/entry_points.txt +0 -0
- {symbolicai-1.5.0.dist-info → symbolicai-1.6.0.dist-info}/licenses/LICENSE +0 -0
- {symbolicai-1.5.0.dist-info → symbolicai-1.6.0.dist-info}/top_level.txt +0 -0
symai/extended/strategies/cot.py
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
from ...models import LLMDataModel
|
|
2
|
-
from ...prompts import PromptLanguage, PromptRegistry
|
|
3
|
-
from ...strategy import BaseStrategy
|
|
4
|
-
|
|
5
|
-
registry = PromptRegistry()
|
|
6
|
-
registry.register_instruction(PromptLanguage.ENGLISH, "static_context_chain_of_thoughts",
|
|
7
|
-
"""
|
|
8
|
-
{
|
|
9
|
-
"step_by_step": "Q: Your warehouse has 5 pallets of widgets. You purchase 2 more shipments of widgets. Each shipment contains 3 pallets. How many pallets of widgets do you have now?
|
|
10
|
-
A: The warehouse started with 5 pallets of widgets. 2 shipments of 3 pallets each is 6 pallets. 5 pallets + 6 pallets = 11 pallets. The answer is 11 pallets.
|
|
11
|
-
Q: Your finance department has $23,000 in the budget. If they allocate $20,000 for a marketing campaign and add $6,000 from other savings, how much is left in the budget?"
|
|
12
|
-
"answer": "The finance department started with $23,000. They allocated $20,000 for a marketing campaign and added $6,000 from other savings. $23,000 - $20,000 + $6,000 = $9,000. The answer is $9,000."
|
|
13
|
-
}
|
|
14
|
-
"""+
|
|
15
|
-
"Think step by step as in the example above before answering."+
|
|
16
|
-
"Return the 'step_by_step' and 'answer' properties of the JSON format."
|
|
17
|
-
"Always ONLY return a valid JSON format that solve the task.")
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
class Result(LLMDataModel):
|
|
21
|
-
step_by_step: str
|
|
22
|
-
answer: str
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
class ChainOfThought(BaseStrategy):
|
|
26
|
-
def __init__(self, data_model=Result, *args, **kwargs):
|
|
27
|
-
super().__init__(data_model=data_model, *args, **kwargs)
|
|
28
|
-
|
|
29
|
-
@property
|
|
30
|
-
def task(self):
|
|
31
|
-
task_str = (
|
|
32
|
-
"Think step by step to solve a problem and answer." \
|
|
33
|
-
+ r'JSON format: {"step_by_step": "string", "answer": "string"}'
|
|
34
|
-
)
|
|
35
|
-
self.print_verbose(task_str)
|
|
36
|
-
return task_str
|
|
37
|
-
|
|
38
|
-
@property
|
|
39
|
-
def static_context(self):
|
|
40
|
-
return registry.instruction("static_context_chain_of_thoughts")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|