add doc strings to public classes

Signed-off-by: Jenkins, Kenneth Alexander <kjenkins60@gatech.edu>
This commit is contained in:
Jenkins, Kenneth Alexander 2026-04-15 23:23:29 -04:00
parent f40d8556fa
commit 4438d7a225
No known key found for this signature in database
6 changed files with 32 additions and 0 deletions

View file

@ -2,6 +2,13 @@
import asyncio
class Flow:
"""
Runtime representation of a deployed flow process.
This class maintains internal processor states and orchestrates
lifecycles (start, stop) for inputs (consumers) and parameters
that drive data flowing across linked nodes.
"""
def __init__(self, id, flow, processor, defn):
self.id = id

View file

@ -42,6 +42,12 @@ class LlmChunk:
__slots__ = ["text", "in_token", "out_token", "model", "is_final"]
class LlmService(FlowProcessor):
"""
Extensible service processing requests to Large Language Models (LLMs).
This class handles the core logic of dispatching text completion or chat requests
to integrated underlying LLM providers (e.g. OpenAI, vertex ai).
"""
def __init__(self, **params):

View file

@ -3,6 +3,12 @@ from prometheus_client import start_http_server, Info, Enum, Histogram
from prometheus_client import Counter
class ConsumerMetrics:
"""
Metrics tracking and reporting for flow consumers.
This class manages prometheus metrics specifically related to consumers
within the flow, including state, requests, processing time, and queues.
"""
def __init__(self, processor, flow, name):

View file

@ -5,6 +5,13 @@ from . request_response_spec import RequestResponse, RequestResponseSpec
from .. schema import ToolRequest, ToolResponse
class ToolClient(RequestResponse):
"""
Client for invoking tools over the flow messaging fabric.
This class provides an interface to abstract away the messaging mechanics
and provides a direct awaitable mechanism for invoking tools and
getting their responses.
"""
async def invoke(self, name, parameters={}, timeout=600):

View file

@ -15,6 +15,12 @@ logger = logging.getLogger(__name__)
default_ident = "triples-write"
class TriplesStoreService(FlowProcessor):
"""
Component for maintaining the triples store.
This service acts as a processor in the flow that receives knowledge triples
and writes them persistently into an overarching graph database or equivalent backend.
"""
def __init__(self, **params):

0
trustgraph-base/trustgraph/schema/services/lookup.py Normal file → Executable file
View file