Skip to content

Commit ebce715

Browse files
committed
fix(general): improvements
1 parent 349b395 commit ebce715

File tree

4 files changed

+59
-49
lines changed

4 files changed

+59
-49
lines changed

src/flare_ai_kit/ecosystem/protocols/ftsov2.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ async def create(cls, settings: EcosystemSettings) -> Self:
3838
3939
"""
4040
instance = cls(settings)
41-
logger.debug("Initializing FtsoV2...")
41+
logger.info("Initializing FtsoV2...")
4242
# Await the async method from the base class
4343
ftsov2_address = await instance.get_protocol_contract_address("FtsoV2")
4444
instance.ftsov2 = instance.w3.eth.contract(
@@ -193,6 +193,7 @@ async def get_latest_prices(
193193
logger.debug(
194194
"get_latest_prices",
195195
feed_names=feed_names,
196+
feed_ids=feed_ids,
196197
value=values,
197198
decimals=decimals,
198199
timestamp=timestamp,
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
"""Module providing tools for data ingestion pipelines."""
22

33
from .github_ingestor import GithubIngestor
4+
from .pdf_processor import PDFProcessor
45

5-
__all__ = ["GithubIngestor"]
6+
__all__ = ["GithubIngestor", "PDFProcessor"]

src/flare_ai_kit/main.py

Lines changed: 31 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
"""Entry point for Flare AI Kit SDK."""
22

3+
import asyncio
4+
5+
import structlog
6+
37
from .a2a import A2AClient
48
from .config import AppSettings
59
from .ecosystem import BlockExplorer, FAssets, Flare, FtsoV2
@@ -9,6 +13,8 @@
913
from .rag.vector import VectorRAGPipeline, create_vector_rag_pipeline
1014
from .social import TelegramClient, XClient
1115

16+
logger = structlog.get_logger(__name__)
17+
1218

1319
class FlareAIKit:
1420
"""The main entry point for the Flare AI Kit SDK."""
@@ -29,16 +35,16 @@ def __init__(self, config: AppSettings | None) -> None:
2935
self.settings = config or AppSettings()
3036

3137
# Lazy-loaded properties
32-
self._flare = None
33-
self._block_explorer = None
34-
self._ftso = None
35-
self._fassets = None
36-
self._vector_rag = None
37-
self._telegram = None
38-
self._github_ingestor = None
39-
self._x_client = None
40-
self._pdf_processor = None
41-
self._a2a_client = None
38+
self._flare: Flare | None = None
39+
self._block_explorer: BlockExplorer | None = None
40+
self._ftso: FtsoV2 | None = None
41+
self._fassets: FAssets | None = None
42+
self._vector_rag: VectorRAGPipeline | None = None
43+
self._telegram: TelegramClient | None = None
44+
self._github_ingestor: GithubIngestor | None = None
45+
self._x_client: XClient | None = None
46+
self._pdf_processor: PDFProcessor | None = None
47+
self._a2a_client: A2AClient | None = None
4248

4349
# Ecosystem Interaction Methods
4450
@property
@@ -122,8 +128,21 @@ def pdf_processor(self) -> PDFProcessor:
122128
return self._pdf_processor
123129

124130
# A2A methods
125-
def a2a_client(self, sqlite_db_path: str) -> A2AClient:
131+
@property
132+
def a2a_client(self) -> A2AClient:
126133
"""Access the A2A client with optional db path."""
127134
if self._a2a_client is None:
128-
self._a2a_client = A2AClient(sqlite_db_path)
135+
self._a2a_client = A2AClient(settings=self.settings.a2a)
129136
return self._a2a_client
137+
138+
139+
async def core() -> None:
140+
"""Core function to run the Flare AI Kit SDK."""
141+
logger.info("Starting Flare AI Kit core...")
142+
# Your core logic
143+
logger.info("Ending Flare AI Kit core...")
144+
145+
146+
def start() -> None:
147+
"""Main entry point for the Flare AI Kit SDK."""
148+
asyncio.run(core())

uv.lock

Lines changed: 24 additions & 35 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)