Llm
This module contains functionality related to the the llm module for augmentation.components.llms.lite_llm.
Llm
ConfigurableLiteLLM
Bases: LiteLLM
Extended LiteLLM that allows context_window and num_output override.
This subclass overrides the metadata property to allow configuration-based context_window and num_output values, rather than relying solely on LiteLLM's model registry defaults.
Source code in src/augmentation/components/llms/lite_llm/llm.py
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | |
metadata
property
Get LLM metadata with configuration overrides applied.
| Returns: |
|
|---|
__init__(*args, context_window=None, num_output=None, **kwargs)
Initialize with optional context_window and num_output overrides.
Source code in src/augmentation/components/llms/lite_llm/llm.py
21 22 23 24 25 26 27 28 29 30 31 | |
LiteLLMFactory
Bases: SingletonFactory
Factory class for creating LiteLLM language model instances.
This class implements the Singleton pattern to ensure only one instance of an LiteLLM model with a specific configuration exists in the application. It uses LiteLLMConfiguration to configure the model parameters.
| Attributes: |
|
|---|
Source code in src/augmentation/components/llms/lite_llm/llm.py
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 | |