Documentation
¶
Overview ¶
The models package provides a generic interface for invoking various AI models.
Index ¶
Constants ¶
View Source
const MockResponseText = "Hello, World!"
Variables ¶
View Source
var InvokeModelCallStack = testutils.NewCallStack()
View Source
var LookupModelCallStack = testutils.NewCallStack()
Functions ¶
func GetModel ¶
func GetModel[TModel Model[TIn, TOut], TIn, TOut any, P modelPtr[TModel]](name string) (*TModel, error)
Gets a model object instance, which can be used to interact with the model.
- The generic type parameter [TModel] is used to specify the API that the model adheres to.
- The name parameter is used to identify the model in the modus.json manifest file.
Note that of the generic type parameters, only [TModel] needs to be specified. The others are inferred automatically.
Types ¶
Directories
¶
| Path | Synopsis |
|---|---|
|
The openai package provides objects that conform to the OpenAI API specification.
|
The openai package provides objects that conform to the OpenAI API specification. |
Click to show internal directories.
Click to hide internal directories.