RuntimeConfig
🛈 DocStrings¶
Fully initialized runtime configuration.
This represents the "live" state of a Config, with all components initialized and ready to use. It provides a clean interface to access and manage runtime resources without exposing internal registries.
Source code in src/llmling/config/runtime.py
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 | |
tools
property
¶
tools: dict[str, LLMCallableTool]
Get all registered tools.
Returns:
| Type | Description |
|---|---|
dict[str, LLMCallableTool]
|
Dictionary mapping tool names to tools |
__aenter__
async
¶
Initialize dependencies and registries.
Source code in src/llmling/config/runtime.py
__aexit__
async
¶
__aexit__(
exc_type: type[BaseException] | None,
exc_val: BaseException | None,
exc_tb: TracebackType | None,
) -> None
Clean up dependencies and registries.
Source code in src/llmling/config/runtime.py
__enter__
¶
Synchronous context manager entry.
Source code in src/llmling/config/runtime.py
__exit__
¶
__exit__(
exc_type: type[BaseException] | None,
exc_val: BaseException | None,
exc_tb: TracebackType | None,
) -> None
Synchronous context manager exit.
Source code in src/llmling/config/runtime.py
__init__
¶
__init__(
config: Config,
*,
loader_registry: ResourceLoaderRegistry,
processor_registry: ProcessorRegistry,
resource_registry: ResourceRegistry,
prompt_registry: PromptRegistry,
tool_registry: ToolRegistry
) -> None
Initialize with config and registries.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config
|
Config
|
Original static configuration |
required |
loader_registry
|
ResourceLoaderRegistry
|
Registry for resource loaders |
required |
processor_registry
|
ProcessorRegistry
|
Registry for content processors |
required |
resource_registry
|
ResourceRegistry
|
Registry for resources |
required |
prompt_registry
|
PromptRegistry
|
Registry for prompts |
required |
tool_registry
|
ToolRegistry
|
Registry for tools |
required |
Source code in src/llmling/config/runtime.py
create
async
classmethod
¶
create(config: Config) -> Self
Create and initialize a runtime configuration.
This is a convenience method that ensures proper initialization when not using the async context manager.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config
|
Config
|
Static configuration to initialize from |
required |
Returns:
| Type | Description |
|---|---|
Self
|
Initialized runtime configuration |
Source code in src/llmling/config/runtime.py
execute_tool
async
¶
Execute a tool by name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
_name
|
str
|
Name of the tool to execute |
required |
**params
|
Any
|
Parameters to pass to the tool |
{}
|
Returns:
| Type | Description |
|---|---|
Any
|
Tool execution result |
Raises:
| Type | Description |
|---|---|
ToolError
|
If tool execution fails |
Source code in src/llmling/config/runtime.py
from_config
classmethod
¶
from_config(config: Config | JoinablePathLike) -> Self
Create a fully initialized runtime config from static config.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config
|
Config | JoinablePathLike
|
Static configuration to initialize from |
required |
Returns:
| Type | Description |
|---|---|
Self
|
Initialized runtime configuration |
Source code in src/llmling/config/runtime.py
from_file
classmethod
¶
Convenience function to directly create runtime config from a file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
JoinablePathLike
|
Path to the config file |
required |
Returns:
| Type | Description |
|---|---|
Self
|
Initialized runtime configuration |
Source code in src/llmling/config/runtime.py
get_prompt
¶
get_prompt(name: str) -> BasePrompt
Get a prompt by name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Name of the prompt |
required |
Returns:
| Type | Description |
|---|---|
BasePrompt
|
The prompt |
Raises:
| Type | Description |
|---|---|
LLMLingError
|
If prompt not found |
Source code in src/llmling/config/runtime.py
get_prompt_completions
async
¶
get_prompt_completions(
current_value: str, argument_name: str, prompt_name: str, **options: Any
) -> list[str]
Get completions for a prompt argument.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
current_value
|
str
|
Current input value |
required |
argument_name
|
str
|
Name of the argument |
required |
prompt_name
|
str
|
Name of the prompt |
required |
**options
|
Any
|
Additional options |
{}
|
Returns:
| Type | Description |
|---|---|
list[str]
|
List of completion suggestions |
Source code in src/llmling/config/runtime.py
get_prompts
¶
get_prompts() -> Sequence[BasePrompt]
get_resource
¶
get_resource(name_or_uri: str) -> BaseResource
Get a resource configuration by name or URI.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name_or_uri
|
str
|
Name of the resource or its URI. URIs must start with a scheme (e.g., "file://", "text://", etc.) |
required |
Returns:
| Type | Description |
|---|---|
BaseResource
|
The resource configuration |
Raises:
| Type | Description |
|---|---|
ResourceError
|
If resource not found |
Source code in src/llmling/config/runtime.py
get_resource_completions
async
¶
get_resource_completions(
uri: str, current_value: str, argument_name: str | None = None, **options: Any
) -> list[str]
Get completions for a resource.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
uri
|
str
|
Resource URI |
required |
current_value
|
str
|
Current input value |
required |
argument_name
|
str | None
|
Optional argument name |
None
|
**options
|
Any
|
Additional options |
{}
|
Returns:
| Type | Description |
|---|---|
list[str]
|
List of completion suggestions |
Source code in src/llmling/config/runtime.py
get_resource_loader
¶
get_resource_loader(resource: BaseResource) -> Any
Get loader for a resource type.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
resource
|
BaseResource
|
Resource to get loader for |
required |
Returns:
| Type | Description |
|---|---|
Any
|
Resource loader instance |
Raises:
| Type | Description |
|---|---|
LoaderError
|
If no loader found for resource type |
Source code in src/llmling/config/runtime.py
get_resource_uri
¶
Get URI for a resource.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Name of the resource |
required |
Returns:
| Type | Description |
|---|---|
str
|
URI for the resource |
Raises:
| Type | Description |
|---|---|
ResourceError
|
If resource not found |
Source code in src/llmling/config/runtime.py
get_resources
¶
get_resources() -> Sequence[BaseResource]
Get all registered resource configurations.
Returns:
| Type | Description |
|---|---|
Sequence[BaseResource]
|
List of all resource configurations |
get_tool
¶
get_tool(name: str) -> LLMCallableTool
Get a tool by name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Name of the tool |
required |
Returns:
| Type | Description |
|---|---|
LLMCallableTool
|
The tool |
Raises:
| Type | Description |
|---|---|
ToolError
|
If tool not found |
get_tools
¶
get_tools() -> Sequence[LLMCallableTool]
install_package
async
¶
Install a Python package using the dependency manager.
Package specifications follow PIP format (e.g. "requests>=2.28.0").
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
package
|
str
|
Package specification to install |
required |
Returns:
| Type | Description |
|---|---|
str
|
Message confirming the installation |
Raises:
| Type | Description |
|---|---|
ToolError
|
If installation fails or package spec is invalid |
Example
await runtime.install_package("requests>=2.28.0")
Source code in src/llmling/config/runtime.py
list_prompt_names
¶
List all available prompt names.
Returns:
| Type | Description |
|---|---|
Sequence[str]
|
List of registered prompt names |
list_resource_names
¶
List all available resource names.
Returns:
| Type | Description |
|---|---|
Sequence[str]
|
List of registered resource names |
list_resource_uris
¶
List all available resource URIs.
Returns:
| Type | Description |
|---|---|
Sequence[str]
|
List of registered resource names |
list_tool_names
¶
List all available tool names.
Returns:
| Type | Description |
|---|---|
Sequence[str]
|
List of registered tool names |
load_resource
async
¶
load_resource(name: str) -> LoadedResource
Load a resource by its registered name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Name of the resource as registered in configuration |
required |
Returns:
| Type | Description |
|---|---|
LoadedResource
|
LoadedResource containing content and metadata |
Raises:
| Type | Description |
|---|---|
ResourceError
|
If resource doesn't exist or cannot be loaded |
Source code in src/llmling/config/runtime.py
load_resource_by_uri
async
¶
load_resource_by_uri(uri: str) -> LoadedResource
Load a resource by URI.
Source code in src/llmling/config/runtime.py
open
async
classmethod
¶
open(
source: JoinablePathLike | Config, *, validate: bool = True, strict: bool = False
) -> AsyncGenerator[RuntimeConfig]
Create and manage a runtime configuration asynchronously.
This is the primary way to create and use a RuntimeConfig. It ensures proper initialization and cleanup of all resources and provides an async context manager interface.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
source
|
JoinablePathLike | Config
|
Either a path to a configuration file or a Config object. File paths can be strings or PathLike objects. |
required |
validate
|
bool
|
Whether to validate the configuration. When True, performs additional checks beyond basic schema validation. |
True
|
strict
|
bool
|
Whether to raise exceptions on validation warnings. Only applicable when validate=True. |
False
|
Yields:
| Type | Description |
|---|---|
AsyncGenerator[RuntimeConfig]
|
Fully initialized RuntimeConfig instance |
Raises:
| Type | Description |
|---|---|
ConfigError
|
If configuration is invalid or validation fails in strict mode |
TypeError
|
If source is neither a path nor a Config object |
OSError
|
If configuration file cannot be accessed |
Example
Note
The context manager ensures that all resources are properly initialized before use and cleaned up afterwards, even if an error occurs.
Source code in src/llmling/config/runtime.py
open_sync
classmethod
¶
open_sync(
source: JoinablePathLike | Config, *, validate: bool = True, strict: bool = False
) -> Generator[RuntimeConfig]
Create and manage a runtime configuration synchronously.
This is the synchronous version of open(). It provides the same functionality but uses a standard synchronous context manager interface. Use this if you don't need async functionality.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
source
|
JoinablePathLike | Config
|
Either a path to a configuration file or a Config object. File paths can be strings or PathLike objects. |
required |
validate
|
bool
|
Whether to validate the configuration. When True, performs additional checks beyond basic schema validation. |
True
|
strict
|
bool
|
Whether to raise exceptions on validation warnings. Only applicable when validate=True. |
False
|
Yields:
| Type | Description |
|---|---|
Generator[RuntimeConfig]
|
Fully initialized RuntimeConfig instance |
Raises:
| Type | Description |
|---|---|
ConfigError
|
If configuration is invalid or validation fails in strict mode |
TypeError
|
If source is neither a path nor a Config object |
OSError
|
If configuration file cannot be accessed |
Example
Note
The context manager ensures that all resources are properly initialized before use and cleaned up afterwards, even if an error occurs.
Source code in src/llmling/config/runtime.py
process_content
async
¶
process_content(content: str, processor_name: str, **kwargs: Any) -> ProcessorResult
Process content with a named processor.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
content
|
str
|
Content to process |
required |
processor_name
|
str
|
Name of processor to use |
required |
**kwargs
|
Any
|
Additional processor arguments |
{}
|
Returns:
| Type | Description |
|---|---|
ProcessorResult
|
Processing result |
Raises:
| Type | Description |
|---|---|
ProcessorError
|
If processing fails |
Source code in src/llmling/config/runtime.py
register_code_tool
async
¶
Register a new tool from Python code.
The provided code should define a function that will be converted into a tool. The function's docstring will be used as the tool's description if no description is provided.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Name for the new tool |
required |
code
|
str
|
Python code defining the tool function |
required |
description
|
str | None
|
Optional description override |
None
|
Returns:
| Type | Description |
|---|---|
str
|
Message confirming the registration |
Raises:
| Type | Description |
|---|---|
ToolError
|
If registration fails |
Example
code = ''' ... async def count_words(text: str) -> dict[str, int]: ... words = text.split() ... return {"total": len(words)} ... ''' await runtime.register_code_tool("word_count", code)
Source code in src/llmling/config/runtime.py
register_dynamic_prompt
¶
register_dynamic_prompt(
name: str,
fn: str | Callable[..., Any],
*,
description: str | None = None,
template: str | None = None,
replace: bool = False
) -> None
Register a function-based prompt.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Name to register under |
required |
fn
|
str | Callable[..., Any]
|
Function or import path (e.g., "module.submodule.function") |
required |
description
|
str | None
|
Optional description (extracted from docstring if not provided) |
None
|
template
|
str | None
|
Optional template for formatting output |
None
|
replace
|
bool
|
Whether to replace existing prompt |
False
|
Example
def get_info(url: str) -> str: ... '''Fetch info from URL.''' ... return "info" ... runtime.register_dynamic_prompt("fetch", get_info)
or¶
runtime.register_dynamic_prompt( ... "github", ... "my_module.get_github_info", ... description="Fetch GitHub repository information" ... )
Source code in src/llmling/config/runtime.py
register_file_prompt
¶
register_file_prompt(
name: str,
path: JoinablePathLike,
*,
description: str,
output_format: Literal["text", "markdown", "jinja2"] = "text",
watch: bool = False,
replace: bool = False
) -> None
Register a file-based prompt.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Name to register under |
required |
path
|
JoinablePathLike
|
Path to the prompt file |
required |
description
|
str
|
Human-readable description |
required |
output_format
|
Literal['text', 'markdown', 'jinja2']
|
Format of the file content |
'text'
|
watch
|
bool
|
Whether to watch file for changes |
False
|
replace
|
bool
|
Whether to replace existing prompt |
False
|
Example
runtime.register_file_prompt( ... "analyze", ... "prompts/analysis.md", ... description="Code analysis prompt", ... format="markdown" ... )
Source code in src/llmling/config/runtime.py
register_prompt
¶
register_prompt(name: str, prompt: BasePrompt, *, replace: bool = False) -> None
Register a pre-configured prompt.
Note
The specialized registration methods should be preferred: - register_dynamic_prompt() for function-based prompts - register_static_prompt() for message-based prompts - register_file_prompt() for file-based prompts
This method is provided for advanced use cases where you need to register an already configured prompt instance.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Name to register under |
required |
prompt
|
BasePrompt
|
Configured prompt instance |
required |
replace
|
bool
|
Whether to replace existing prompt |
False
|
Source code in src/llmling/config/runtime.py
register_resource
¶
register_resource(name: str, resource: BaseResource, *, replace: bool = False) -> None
Register a new resource.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Name for the resource |
required |
resource
|
BaseResource
|
Resource to register |
required |
replace
|
bool
|
Whether to replace existing resource |
False
|
Raises:
| Type | Description |
|---|---|
ResourceError
|
If name exists and replace=False |
Source code in src/llmling/config/runtime.py
register_resource_by_loader
async
¶
register_resource_by_loader(
loader_type: str, name: str, *, description: str = "", **params: Any
) -> BaseResource
Register a resource using a loader type.
Provides a parameter-based interface for registering resources without requiring resource objects.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
loader_type
|
str
|
Type of loader to use ("path", "text", "cli", etc.) |
required |
name
|
str
|
Name for the resource |
required |
description
|
str
|
Optional description |
''
|
**params
|
Any
|
Loader-specific parameters |
{}
|
Example
await runtime.register_resource_by_loader( "path", "readme", description="Project readme", path="README.md" )
await runtime.register_resource_by_loader( "text", "greeting", content="Hello, world!" )
Source code in src/llmling/config/runtime.py
register_static_prompt
¶
register_static_prompt(
name: str, content: str, description: str | None = None, *, replace: bool = False
) -> None
Register a static prompt with text content.
A static prompt is a simple text template that can be used as-is or with Python's string formatting (using {placeholder} syntax).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Name to register under |
required |
content
|
str
|
Prompt text content |
required |
description
|
str | None
|
Optional description of what the prompt does |
None
|
replace
|
bool
|
Whether to replace existing prompt |
False
|
Example
runtime.register_static_prompt( ... "summarize", ... "Please summarize the following text in 3 bullet points:\n{text}", ... description="Create a bullet-point summary", ... ) runtime.register_static_prompt( ... "greet", ... "Hello {name}! Welcome to {company}.", ... description="Simple greeting template", ... )
Raises:
| Type | Description |
|---|---|
LLMLingError
|
If registration fails |
Source code in src/llmling/config/runtime.py
register_tool
async
¶
register_tool(
function: str | Callable[..., Any],
name: str | None = None,
description: str | None = None,
*,
auto_install: bool = False
) -> str
Register a new tool from a function or import path.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
function
|
str | Callable[..., Any]
|
Function to register (callable or import path) |
required |
name
|
str | None
|
Optional name override (uses function name if None) |
None
|
description
|
str | None
|
Optional description override (uses docstring if None) |
None
|
auto_install
|
bool
|
Whether to attempt installing missing package |
False
|
Returns:
| Type | Description |
|---|---|
str
|
Message confirming the registration |
Raises:
| Type | Description |
|---|---|
ToolError
|
If registration fails |
Example
await runtime.register_tool("webbrowser.open", "open_url") await runtime.register_tool(my_function)
Source code in src/llmling/config/runtime.py
render_prompt
async
¶
render_prompt(name: str, arguments: dict[str, Any] | None = None) -> Sequence[PromptMessage]
Format a prompt with arguments.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Name of the prompt |
required |
arguments
|
dict[str, Any] | None
|
Optional arguments for formatting |
None
|
Returns:
| Type | Description |
|---|---|
Sequence[PromptMessage]
|
List of formatted messages |
Raises:
| Type | Description |
|---|---|
LLMLingError
|
If prompt not found or formatting fails |
Source code in src/llmling/config/runtime.py
resolve_resource_uri
async
¶
resolve_resource_uri(uri_or_name: str) -> tuple[str, BaseResource]
Resolve a resource identifier to a proper URI and resource.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
uri_or_name
|
str
|
Can be: - Resource name: "test.txt" - Full URI: "file:///test.txt" - Local path: "/path/to/file.txt" |
required |
Returns:
| Type | Description |
|---|---|
tuple[str, BaseResource]
|
Tuple of (resolved URI, resource object) |
Raises:
| Type | Description |
|---|---|
ResourceError
|
If resolution fails |
Source code in src/llmling/config/runtime.py
shutdown
async
¶
Shut down all runtime components.
Source code in src/llmling/config/runtime.py
startup
async
¶
Start all runtime components.