flo-ai 1.0.0.dev1__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.
Files changed (31) hide show
  1. {flo_ai-1.0.0.dev1 → flo_ai-1.0.0.dev3}/PKG-INFO +1 -1
  2. flo_ai-1.0.0.dev3/flo_ai/__init__.py +66 -0
  3. {flo_ai-1.0.0.dev1 → flo_ai-1.0.0.dev3}/flo_ai/llm/base_llm.py +1 -0
  4. {flo_ai-1.0.0.dev1 → flo_ai-1.0.0.dev3}/flo_ai/llm/gemini_llm.py +6 -0
  5. {flo_ai-1.0.0.dev1 → flo_ai-1.0.0.dev3}/flo_ai/models/__init__.py +1 -7
  6. {flo_ai-1.0.0.dev1 → flo_ai-1.0.0.dev3}/flo_ai/utils/__init__.py +1 -3
  7. {flo_ai-1.0.0.dev1 → flo_ai-1.0.0.dev3}/flo_ai/utils/flo_utils.py +6 -7
  8. {flo_ai-1.0.0.dev1 → flo_ai-1.0.0.dev3}/pyproject.toml +1 -1
  9. flo_ai-1.0.0.dev1/flo_ai/__init__.py +0 -92
  10. {flo_ai-1.0.0.dev1 → flo_ai-1.0.0.dev3}/README.md +0 -0
  11. {flo_ai-1.0.0.dev1 → flo_ai-1.0.0.dev3}/flo_ai/arium/README.md +0 -0
  12. {flo_ai-1.0.0.dev1 → flo_ai-1.0.0.dev3}/flo_ai/arium/__init__.py +0 -0
  13. {flo_ai-1.0.0.dev1 → flo_ai-1.0.0.dev3}/flo_ai/arium/arium.py +0 -0
  14. {flo_ai-1.0.0.dev1 → flo_ai-1.0.0.dev3}/flo_ai/arium/base.py +0 -0
  15. {flo_ai-1.0.0.dev1 → flo_ai-1.0.0.dev3}/flo_ai/arium/builder.py +0 -0
  16. {flo_ai-1.0.0.dev1 → flo_ai-1.0.0.dev3}/flo_ai/arium/examples.py +0 -0
  17. {flo_ai-1.0.0.dev1 → flo_ai-1.0.0.dev3}/flo_ai/arium/memory.py +0 -0
  18. {flo_ai-1.0.0.dev1 → flo_ai-1.0.0.dev3}/flo_ai/arium/models.py +0 -0
  19. {flo_ai-1.0.0.dev1 → flo_ai-1.0.0.dev3}/flo_ai/builder/agent_builder.py +0 -0
  20. {flo_ai-1.0.0.dev1 → flo_ai-1.0.0.dev3}/flo_ai/formatter/yaml_format_parser.py +0 -0
  21. {flo_ai-1.0.0.dev1 → flo_ai-1.0.0.dev3}/flo_ai/llm/__init__.py +0 -0
  22. {flo_ai-1.0.0.dev1 → flo_ai-1.0.0.dev3}/flo_ai/llm/anthropic_llm.py +0 -0
  23. {flo_ai-1.0.0.dev1 → flo_ai-1.0.0.dev3}/flo_ai/llm/ollama_llm.py +0 -0
  24. {flo_ai-1.0.0.dev1 → flo_ai-1.0.0.dev3}/flo_ai/llm/openai_llm.py +0 -0
  25. {flo_ai-1.0.0.dev1 → flo_ai-1.0.0.dev3}/flo_ai/models/agent.py +0 -0
  26. {flo_ai-1.0.0.dev1 → flo_ai-1.0.0.dev3}/flo_ai/models/agent_error.py +0 -0
  27. {flo_ai-1.0.0.dev1 → flo_ai-1.0.0.dev3}/flo_ai/models/base_agent.py +0 -0
  28. {flo_ai-1.0.0.dev1 → flo_ai-1.0.0.dev3}/flo_ai/tool/__init__.py +0 -0
  29. {flo_ai-1.0.0.dev1 → flo_ai-1.0.0.dev3}/flo_ai/tool/base_tool.py +0 -0
  30. {flo_ai-1.0.0.dev1 → flo_ai-1.0.0.dev3}/flo_ai/tool/flo_tool.py +0 -0
  31. {flo_ai-1.0.0.dev1 → flo_ai-1.0.0.dev3}/flo_ai/utils/logger.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: flo_ai
3
- Version: 1.0.0.dev1
3
+ Version: 1.0.0.dev3
4
4
  Summary: A easy way to create structured AI agents
5
5
  License: MIT
6
6
  Author: rootflo
@@ -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'
@@ -7,6 +7,7 @@ from dataclasses import dataclass
7
7
  @dataclass
8
8
  class ImageMessage:
9
9
  image_url: Optional[str] = None
10
+ image_bytes: Optional[bytes] = None
10
11
  image_file_path: Optional[str] = None
11
12
  image_base64: Optional[str] = None
12
13
  mime_type: Optional[str] = None
@@ -12,6 +12,7 @@ class Gemini(BaseLLM):
12
12
  model: str = 'gemini-2.5-flash',
13
13
  temperature: float = 0.7,
14
14
  api_key: Optional[str] = None,
15
+ base_url: str = None,
15
16
  **kwargs,
16
17
  ):
17
18
  super().__init__(model, api_key, temperature, **kwargs)
@@ -153,6 +154,11 @@ class Gemini(BaseLLM):
153
154
  data=image_bytes,
154
155
  mime_type=image.mime_type,
155
156
  )
157
+ elif image.image_bytes:
158
+ return genai.types.Part.from_bytes(
159
+ data=image.image_bytes,
160
+ mime_type=image.mime_type,
161
+ )
156
162
  raise NotImplementedError(
157
163
  'Not other way other than file path has been implemented'
158
164
  )
@@ -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,5 +1,3 @@
1
1
  from .flo_utils import FloUtils
2
2
 
3
- __all__ = [
4
- 'FloUtils'
5
- ]
3
+ __all__ = ['FloUtils']
@@ -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,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "flo_ai"
3
- version = "1.0.0-dev1"
3
+ version = "1.0.0-dev3"
4
4
  description = "A easy way to create structured AI agents"
5
5
  authors = ["rootflo <*@rootflo.ai>"]
6
6
  license = "MIT"
@@ -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