Chat API
All the following functions, types, interfaces are exported by the library.
Completion API
All the following functions, types, interfaces are exported by the library.
Embedding API
All the following functions, types, interfaces are exported by the library.
ModelFarm JavaScript/TypeScript
ModelFarm expects to run within a Replit managed server context. Use this library in servers or other applications that execute on a Replit server, rather than your user's browser.
Request Error
RequestError interface represents an HTTP error with a message and an HTTP status code. It's surfaced in the API as the error in result type.
Result
A Result represents a successful value or an error. It forces the consumer to check whether the returned type is an error or not, result.ok acts as a discriminant between success and failure.