flo-ai 1.0.0.dev2__tar.gz → 1.0.0.dev3__tar.gz
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.
- {flo_ai-1.0.0.dev2 → flo_ai-1.0.0.dev3}/PKG-INFO +1 -1
- flo_ai-1.0.0.dev3/flo_ai/__init__.py +66 -0
- {flo_ai-1.0.0.dev2 → flo_ai-1.0.0.dev3}/flo_ai/models/__init__.py +1 -7
- {flo_ai-1.0.0.dev2 → flo_ai-1.0.0.dev3}/flo_ai/utils/__init__.py +1 -3
- {flo_ai-1.0.0.dev2 → flo_ai-1.0.0.dev3}/flo_ai/utils/flo_utils.py +6 -7
- {flo_ai-1.0.0.dev2 → flo_ai-1.0.0.dev3}/pyproject.toml +1 -1
- flo_ai-1.0.0.dev2/flo_ai/__init__.py +0 -92
- {flo_ai-1.0.0.dev2 → flo_ai-1.0.0.dev3}/README.md +0 -0
- {flo_ai-1.0.0.dev2 → flo_ai-1.0.0.dev3}/flo_ai/arium/README.md +0 -0
- {flo_ai-1.0.0.dev2 → flo_ai-1.0.0.dev3}/flo_ai/arium/__init__.py +0 -0
- {flo_ai-1.0.0.dev2 → flo_ai-1.0.0.dev3}/flo_ai/arium/arium.py +0 -0
- {flo_ai-1.0.0.dev2 → flo_ai-1.0.0.dev3}/flo_ai/arium/base.py +0 -0
- {flo_ai-1.0.0.dev2 → flo_ai-1.0.0.dev3}/flo_ai/arium/builder.py +0 -0
- {flo_ai-1.0.0.dev2 → flo_ai-1.0.0.dev3}/flo_ai/arium/examples.py +0 -0
- {flo_ai-1.0.0.dev2 → flo_ai-1.0.0.dev3}/flo_ai/arium/memory.py +0 -0
- {flo_ai-1.0.0.dev2 → flo_ai-1.0.0.dev3}/flo_ai/arium/models.py +0 -0
- {flo_ai-1.0.0.dev2 → flo_ai-1.0.0.dev3}/flo_ai/builder/agent_builder.py +0 -0
- {flo_ai-1.0.0.dev2 → flo_ai-1.0.0.dev3}/flo_ai/formatter/yaml_format_parser.py +0 -0
- {flo_ai-1.0.0.dev2 → flo_ai-1.0.0.dev3}/flo_ai/llm/__init__.py +0 -0
- {flo_ai-1.0.0.dev2 → flo_ai-1.0.0.dev3}/flo_ai/llm/anthropic_llm.py +0 -0
- {flo_ai-1.0.0.dev2 → flo_ai-1.0.0.dev3}/flo_ai/llm/base_llm.py +0 -0
- {flo_ai-1.0.0.dev2 → flo_ai-1.0.0.dev3}/flo_ai/llm/gemini_llm.py +0 -0
- {flo_ai-1.0.0.dev2 → flo_ai-1.0.0.dev3}/flo_ai/llm/ollama_llm.py +0 -0
- {flo_ai-1.0.0.dev2 → flo_ai-1.0.0.dev3}/flo_ai/llm/openai_llm.py +0 -0
- {flo_ai-1.0.0.dev2 → flo_ai-1.0.0.dev3}/flo_ai/models/agent.py +0 -0
- {flo_ai-1.0.0.dev2 → flo_ai-1.0.0.dev3}/flo_ai/models/agent_error.py +0 -0
- {flo_ai-1.0.0.dev2 → flo_ai-1.0.0.dev3}/flo_ai/models/base_agent.py +0 -0
- {flo_ai-1.0.0.dev2 → flo_ai-1.0.0.dev3}/flo_ai/tool/__init__.py +0 -0
- {flo_ai-1.0.0.dev2 → flo_ai-1.0.0.dev3}/flo_ai/tool/base_tool.py +0 -0
- {flo_ai-1.0.0.dev2 → flo_ai-1.0.0.dev3}/flo_ai/tool/flo_tool.py +0 -0
- {flo_ai-1.0.0.dev2 → flo_ai-1.0.0.dev3}/flo_ai/utils/logger.py +0 -0
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"""
|
|
2
|
+
flo_ai - A flexible agent framework for LLM-powered applications
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
# Models package - Agent framework components
|
|
6
|
+
from .models import Agent, AgentError, BaseAgent, AgentType, ReasoningPattern
|
|
7
|
+
|
|
8
|
+
from .builder.agent_builder import AgentBuilder
|
|
9
|
+
|
|
10
|
+
# LLM package - Language model integrations
|
|
11
|
+
from .llm import BaseLLM, Anthropic, OpenAI, OllamaLLM, Gemini
|
|
12
|
+
|
|
13
|
+
# Tool package - Tool framework components
|
|
14
|
+
from .tool import Tool, ToolExecutionError, flo_tool, create_tool_from_function
|
|
15
|
+
|
|
16
|
+
# Arium package - Workflow and memory components
|
|
17
|
+
from .arium import (
|
|
18
|
+
Arium,
|
|
19
|
+
BaseArium,
|
|
20
|
+
create_arium,
|
|
21
|
+
MessageMemory,
|
|
22
|
+
BaseMemory,
|
|
23
|
+
StartNode,
|
|
24
|
+
EndNode,
|
|
25
|
+
Edge,
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
# Utils package - Utility functions
|
|
29
|
+
from .utils import FloUtils
|
|
30
|
+
|
|
31
|
+
__all__ = [
|
|
32
|
+
# Models
|
|
33
|
+
'Agent',
|
|
34
|
+
'AgentError',
|
|
35
|
+
'BaseAgent',
|
|
36
|
+
'AgentType',
|
|
37
|
+
'ReasoningPattern',
|
|
38
|
+
# Utils
|
|
39
|
+
'FloUtils',
|
|
40
|
+
# LLM
|
|
41
|
+
'BaseLLM',
|
|
42
|
+
'Anthropic',
|
|
43
|
+
'OpenAI',
|
|
44
|
+
'OllamaLLM',
|
|
45
|
+
'Gemini',
|
|
46
|
+
# Tools
|
|
47
|
+
'Tool',
|
|
48
|
+
'ToolExecutionError',
|
|
49
|
+
'flo_tool',
|
|
50
|
+
'create_tool_from_function',
|
|
51
|
+
# Arium
|
|
52
|
+
'Arium',
|
|
53
|
+
'BaseArium',
|
|
54
|
+
'AriumBuilder',
|
|
55
|
+
'create_arium',
|
|
56
|
+
'MessageMemory',
|
|
57
|
+
'BaseMemory',
|
|
58
|
+
'StartNode',
|
|
59
|
+
'EndNode',
|
|
60
|
+
'Edge',
|
|
61
|
+
# Builder
|
|
62
|
+
'AgentBuilder',
|
|
63
|
+
'AriumBuilder',
|
|
64
|
+
]
|
|
65
|
+
|
|
66
|
+
__version__ = '1.0.0'
|
|
@@ -6,10 +6,4 @@ from .agent import Agent
|
|
|
6
6
|
from .agent_error import AgentError
|
|
7
7
|
from .base_agent import BaseAgent, AgentType, ReasoningPattern
|
|
8
8
|
|
|
9
|
-
__all__ = [
|
|
10
|
-
"Agent",
|
|
11
|
-
"AgentError",
|
|
12
|
-
"BaseAgent",
|
|
13
|
-
"AgentType",
|
|
14
|
-
"ReasoningPattern"
|
|
15
|
-
]
|
|
9
|
+
__all__ = ['Agent', 'AgentError', 'BaseAgent', 'AgentType', 'ReasoningPattern']
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
from typing import Dict, Any
|
|
2
|
-
import re
|
|
3
2
|
import json
|
|
4
3
|
from flo_ai.utils.logger import logger
|
|
5
4
|
|
|
6
5
|
|
|
7
6
|
class FloUtils:
|
|
8
|
-
|
|
9
7
|
@staticmethod
|
|
10
8
|
def extract_jsons_from_string(data: str, strict: bool = False) -> Dict[str, Any]:
|
|
11
9
|
"""
|
|
@@ -14,6 +12,7 @@ class FloUtils:
|
|
|
14
12
|
3) Merge into one dict (later keys override earlier)
|
|
15
13
|
4) On strict mode, raise FloException if no JSON found
|
|
16
14
|
"""
|
|
15
|
+
|
|
17
16
|
# Custom function to find balanced braces since (?R) is not supported in Python re
|
|
18
17
|
def find_balanced_braces(text):
|
|
19
18
|
matches = []
|
|
@@ -25,10 +24,10 @@ class FloUtils:
|
|
|
25
24
|
j = i + 1
|
|
26
25
|
in_string = False
|
|
27
26
|
escape_next = False
|
|
28
|
-
|
|
27
|
+
|
|
29
28
|
while j < len(text) and brace_count > 0:
|
|
30
29
|
char = text[j]
|
|
31
|
-
|
|
30
|
+
|
|
32
31
|
if escape_next:
|
|
33
32
|
escape_next = False
|
|
34
33
|
elif char == '\\' and in_string:
|
|
@@ -40,9 +39,9 @@ class FloUtils:
|
|
|
40
39
|
brace_count += 1
|
|
41
40
|
elif char == '}':
|
|
42
41
|
brace_count -= 1
|
|
43
|
-
|
|
42
|
+
|
|
44
43
|
j += 1
|
|
45
|
-
|
|
44
|
+
|
|
46
45
|
if brace_count == 0:
|
|
47
46
|
candidate = text[start:j]
|
|
48
47
|
# Try to validate it's actually JSON by attempting to parse
|
|
@@ -77,7 +76,7 @@ class FloUtils:
|
|
|
77
76
|
raise ValueError(f'No JSON found in strict mode: {data}')
|
|
78
77
|
|
|
79
78
|
return merged
|
|
80
|
-
|
|
79
|
+
|
|
81
80
|
@staticmethod
|
|
82
81
|
def strip_comments_from_string(data: str) -> str:
|
|
83
82
|
"""Remove JS-style comments (// and /*…*/) so json.loads() will succeed."""
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
flo_ai - A flexible agent framework for LLM-powered applications
|
|
3
|
-
"""
|
|
4
|
-
|
|
5
|
-
# Models package - Agent framework components
|
|
6
|
-
from .models import (
|
|
7
|
-
Agent,
|
|
8
|
-
AgentError,
|
|
9
|
-
BaseAgent,
|
|
10
|
-
AgentType,
|
|
11
|
-
ReasoningPattern
|
|
12
|
-
)
|
|
13
|
-
|
|
14
|
-
from .builder.agent_builder import (
|
|
15
|
-
AgentBuilder
|
|
16
|
-
)
|
|
17
|
-
|
|
18
|
-
# LLM package - Language model integrations
|
|
19
|
-
from .llm import (
|
|
20
|
-
BaseLLM,
|
|
21
|
-
Anthropic,
|
|
22
|
-
OpenAI,
|
|
23
|
-
OllamaLLM,
|
|
24
|
-
Gemini
|
|
25
|
-
)
|
|
26
|
-
|
|
27
|
-
# Tool package - Tool framework components
|
|
28
|
-
from .tool import (
|
|
29
|
-
Tool,
|
|
30
|
-
ToolExecutionError,
|
|
31
|
-
flo_tool,
|
|
32
|
-
create_tool_from_function
|
|
33
|
-
)
|
|
34
|
-
|
|
35
|
-
# Arium package - Workflow and memory components
|
|
36
|
-
from .arium import (
|
|
37
|
-
Arium,
|
|
38
|
-
BaseArium,
|
|
39
|
-
create_arium,
|
|
40
|
-
MessageMemory,
|
|
41
|
-
BaseMemory,
|
|
42
|
-
StartNode,
|
|
43
|
-
EndNode,
|
|
44
|
-
Edge
|
|
45
|
-
)
|
|
46
|
-
|
|
47
|
-
# Utils package - Utility functions
|
|
48
|
-
from .utils import (
|
|
49
|
-
FloUtils
|
|
50
|
-
)
|
|
51
|
-
|
|
52
|
-
__all__ = [
|
|
53
|
-
# Models
|
|
54
|
-
"Agent",
|
|
55
|
-
"AgentError",
|
|
56
|
-
"BaseAgent",
|
|
57
|
-
"AgentType",
|
|
58
|
-
"ReasoningPattern",
|
|
59
|
-
|
|
60
|
-
# Utils
|
|
61
|
-
"FloUtils",
|
|
62
|
-
|
|
63
|
-
# LLM
|
|
64
|
-
"BaseLLM",
|
|
65
|
-
"Anthropic",
|
|
66
|
-
"OpenAI",
|
|
67
|
-
"OllamaLLM",
|
|
68
|
-
"Gemini",
|
|
69
|
-
|
|
70
|
-
# Tools
|
|
71
|
-
"Tool",
|
|
72
|
-
"ToolExecutionError",
|
|
73
|
-
"flo_tool",
|
|
74
|
-
"create_tool_from_function",
|
|
75
|
-
|
|
76
|
-
# Arium
|
|
77
|
-
"Arium",
|
|
78
|
-
"BaseArium",
|
|
79
|
-
"AriumBuilder",
|
|
80
|
-
"create_arium",
|
|
81
|
-
"MessageMemory",
|
|
82
|
-
"BaseMemory",
|
|
83
|
-
"StartNode",
|
|
84
|
-
"EndNode",
|
|
85
|
-
"Edge"
|
|
86
|
-
|
|
87
|
-
# Builder
|
|
88
|
-
"AgentBuilder",
|
|
89
|
-
"AriumBuilder"
|
|
90
|
-
]
|
|
91
|
-
|
|
92
|
-
__version__ = "1.0.0"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|