View Source AI (fnord v0.5.5)
AI is a behavior module that defines the interface for interacting with OpenAI's API. It provides a common interface for the various OpenAI-powered operations used by the application.
Summary
Functions
Get embeddings for the given text. The text is split into chunks of 8192 tokens to avoid exceeding the model's input limit. Returns a list of embeddings for each chunk.
Identical to get_embeddings/2
, but raises an error if the request fails.
Create a new AI instance. Instances share the same client connection.
Types
Functions
Get embeddings for the given text. The text is split into chunks of 8192 tokens to avoid exceeding the model's input limit. Returns a list of embeddings for each chunk.
Identical to get_embeddings/2
, but raises an error if the request fails.
Create a new AI instance. Instances share the same client connection.