modosaic.text.generators.factory¶
modosaic.text.generators.factory ¶
TextGenerationModel ¶
Bases: Enum
Text generator implementations supported by the factory.
TextGeneratorFactory ¶
Factory for text generator implementations.
get
staticmethod
¶
get(text_model=TextGenerationModel.INTERN_VL_3_5_2B)
Create a text generator.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
text_model
|
TextGenerationModel
|
Model implementation to instantiate. |
INTERN_VL_3_5_2B
|
Returns:
| Type | Description |
|---|---|
TextGenerator
|
Configured text generator. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the model is unsupported. |
Source code in modosaic/text/generators/factory.py
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 | |