File tree Expand file tree Collapse file tree 5 files changed +50
-25
lines changed Expand file tree Collapse file tree 5 files changed +50
-25
lines changed Original file line number Diff line number Diff line change 1- from .agent import Agent
2-
3- __all__ : list [str ] = ["Agent" ]
Original file line number Diff line number Diff line change 1- from agentle .agents .agent import Agent
2- from agentle .generations .models .structured_outputs_store .audio_description import (
3- AudioDescription ,
4- )
5- from agentle .generations .providers .google .google_genai_generation_provider import (
6- GoogleGenaiGenerationProvider ,
7- )
1+ from __future__ import annotations
2+
3+ from typing import TYPE_CHECKING
4+
5+
6+ if TYPE_CHECKING :
7+ from agentle .agents .agent import Agent
8+ from agentle .generations .models .structured_outputs_store .audio_description import (
9+ AudioDescription ,
10+ )
811
912
1013def audio_description_agent_factory () -> Agent [AudioDescription ]:
@@ -44,6 +47,14 @@ def audio_description_agent_factory() -> Agent[AudioDescription]:
4447 print(result.parsed.overall_description)
4548 ```
4649 """
50+ from agentle .agents .agent import Agent
51+ from agentle .generations .models .structured_outputs_store .audio_description import (
52+ AudioDescription ,
53+ )
54+ from agentle .generations .providers .google .google_genai_generation_provider import (
55+ GoogleGenaiGenerationProvider ,
56+ )
57+
4758 return Agent (
4859 model = "gemini-2.0-flash" ,
4960 instructions = "You are a helpful assistant that deeply understands audio files." ,
Original file line number Diff line number Diff line change 1- from agentle .parsing .parsers .file_parser import FileParser
2- from agentle .parsing .factories .visual_description_agent_factory import (
3- visual_description_agent_factory ,
4- )
5- from agentle .parsing .factories .audio_description_agent_factory import (
6- audio_description_agent_factory ,
7- )
1+ from __future__ import annotations
2+ from typing import TYPE_CHECKING
3+
4+
5+ if TYPE_CHECKING :
6+ from agentle .parsing .parsers .file_parser import FileParser
87
98
109def file_parser_factory () -> FileParser :
10+ from agentle .parsing .parsers .file_parser import FileParser
11+ from agentle .parsing .factories .visual_description_agent_factory import (
12+ visual_description_agent_factory ,
13+ )
14+ from agentle .parsing .factories .audio_description_agent_factory import (
15+ audio_description_agent_factory ,
16+ )
17+
1118 return FileParser (
1219 visual_description_agent = visual_description_agent_factory (),
1320 audio_description_agent = audio_description_agent_factory (),
Original file line number Diff line number Diff line change 1- from agentle .agents .agent import Agent
2- from agentle .generations .models .structured_outputs_store .visual_media_description import (
3- VisualMediaDescription ,
4- )
5- from agentle .generations .providers .google .google_genai_generation_provider import (
6- GoogleGenaiGenerationProvider ,
7- )
1+ from __future__ import annotations
2+
3+ from typing import TYPE_CHECKING
4+
5+ if TYPE_CHECKING :
6+ from agentle .agents .agent import Agent
7+ from agentle .generations .models .structured_outputs_store .visual_media_description import (
8+ VisualMediaDescription ,
9+ )
810
911
1012def visual_description_agent_factory () -> Agent [VisualMediaDescription ]:
@@ -46,6 +48,14 @@ def visual_description_agent_factory() -> Agent[VisualMediaDescription]:
4648 print(result.parsed.ocr_text)
4749 ```
4850 """
51+ from agentle .agents .agent import Agent
52+ from agentle .generations .models .structured_outputs_store .visual_media_description import (
53+ VisualMediaDescription ,
54+ )
55+ from agentle .generations .providers .google .google_genai_generation_provider import (
56+ GoogleGenaiGenerationProvider ,
57+ )
58+
4959 return Agent (
5060 model = "gemini-2.0-pro-vision" ,
5161 instructions = "You are a helpful assistant that deeply understands visual media." ,
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ Example 1: Creating Agents
88
99.. code-block :: python
1010
11- from agentle.agents import Agent
11+ from agentle.agents.agent import Agent
1212
1313 # Example code for creating and configuring agents
1414
You can’t perform that action at this time.
0 commit comments