langtree.models.openai¶
Submodules¶
Package Contents¶
Classes¶
A class to represent and process custom call and parse operations. |
|
A class to represent and process custom call and parse operations. |
|
A class to represent and process custom call and parse operations. |
|
A class to represent and process custom call and parse operations. |
Functions¶
|
Process the output to return a list of embeddings. |
|
|
- class langtree.models.openai.Operator(call=default_call, parse=default_parse)[source]¶
Bases:
objectA class to represent and process custom call and parse operations.
- __call__(*args, **kwargs)[source]¶
Call the Operator’s call function and parse its result.
- Parameters:
*args – Variable length argument list.
**kwargs – Arbitrary keyword arguments.
- Returns:
The parsed result of the call function.
- langtree.models.openai.get_embedding_content(output)[source]¶
Process the output to return a list of embeddings.
Each embedding is a list of float values.
- Parameters:
output (list of lists) – The output containing potential embeddings.
- Returns:
Processed embeddings as lists of float values.
- Return type:
list of lists
- class langtree.models.openai.OpenAIChatCompletion(call=None, parse=None, **kwargs)[source]¶
Bases:
langtree.core.OperatorA class to represent and process custom call and parse operations.
- class langtree.models.openai.OpenAICompletion(call=None, parse=None, **kwargs)[source]¶
Bases:
langtree.core.OperatorA class to represent and process custom call and parse operations.
- class langtree.models.openai.OpenAIEmbedding(call=None, **kwargs)[source]¶
Bases:
langtree.core.OperatorA class to represent and process custom call and parse operations.