dlgforge.llm¶
Public exports for LLM settings and client helpers.
ChatResult(content, tool_calls, raw)
dataclass
¶
Normalized chat completion output.
OpenAIModelClient()
¶
OpenAI-compatible public client, backed internally by LiteLLM.
missing_models(cfg)
¶
Return missing models.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cfg
|
Dict[str, Any]
|
Configuration mapping that controls runtime behavior. |
required |
Returns:
| Type | Description |
|---|---|
List[str]
|
List[str]: Value produced by this API. |
Raises:
| Type | Description |
|---|---|
Exception
|
Propagates unexpected runtime errors from downstream calls. |
Side Effects / I/O: - Primarily performs in-memory transformations.
Preconditions / Invariants: - Callers should provide arguments matching annotated types and expected data contracts.
Examples:
>>> from dlgforge.llm.settings import missing_models
>>> missing_models(...)
required_agents(cfg)
¶
Return required agents.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cfg
|
Dict[str, Any]
|
Configuration mapping that controls runtime behavior. |
required |
Returns:
| Type | Description |
|---|---|
List[str]
|
List[str]: Value produced by this API. |
Raises:
| Type | Description |
|---|---|
Exception
|
Propagates unexpected runtime errors from downstream calls. |
Side Effects / I/O: - Primarily performs in-memory transformations.
Preconditions / Invariants: - Callers should provide arguments matching annotated types and expected data contracts.
Examples:
>>> from dlgforge.llm.settings import required_agents
>>> required_agents(...)
resolve_agent_used_name(cfg, agent_key)
¶
Resolve agent used name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cfg
|
Dict[str, Any]
|
Configuration mapping that controls runtime behavior. |
required |
agent_key
|
str
|
str value used by this operation. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
Resolved value after applying defaults and normalization rules. |
Raises:
| Type | Description |
|---|---|
Exception
|
Propagates unexpected runtime errors from downstream calls. |
Side Effects / I/O: - Primarily performs in-memory transformations.
Preconditions / Invariants: - Callers should provide arguments matching annotated types and expected data contracts.
Examples:
>>> from dlgforge.llm.settings import resolve_agent_used_name
>>> resolve_agent_used_name(...)
resolve_llm_settings(cfg, agent_key)
¶
Resolve llm settings from configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cfg
|
Dict[str, Any]
|
Configuration mapping that controls runtime behavior. |
required |
agent_key
|
str
|
str value used by this operation. |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
Dict[str, Any]: Resolved value after applying defaults and normalization rules. |
Raises:
| Type | Description |
|---|---|
Exception
|
Propagates unexpected runtime errors from downstream calls. |
Side Effects / I/O: - Primarily performs in-memory transformations.
Preconditions / Invariants: - Callers should provide arguments matching annotated types and expected data contracts.
Examples:
>>> from dlgforge.llm.settings import resolve_llm_settings
>>> resolve_llm_settings(...)