feat: enhance model handling with additional info and output schema s… #1168
+152
−38
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request includes several changes to the
langtest
module, focusing on enhancing model initialization, handling additional model parameters, and updating dependencies. The most important changes include modifications to the__init__
andload_model
methods to handle additional model information and output schemas, as well as updating thepredict
method to improve output parsing.Enhancements to model initialization and parameter handling:
langtest/langtest.py
: Added logic to handle additional model information and parameters in the__init__
method. [1] [2] [3]langtest/modelhandler/llm_modelhandler.py
: Introduced theoutput_schema
parameter to the__init__
andload_model
methods, and updated theexclude_args
list to includeoutput_schema
. [1] [2] [3]Improvements to output parsing and prediction:
langtest/modelhandler/llm_modelhandler.py
: Enhanced thepredict
method to incorporate output parsing using theoutput_schema
parameter and updated the prompt configuration and model handling.Dependency updates:
pyproject.toml
: Updated thelangchain
dependency version from0.3.6
to^0.3.15
.