Noizu.Weaviate (Noizu Weaviate v0.1.1)
Noizu.Weaviate is a library providing a simple wrapper around Weaviate's API calls. It handles various API features such as meta information, batch operations, backups, schema operations, nodes information, data objects, and classification.
Configuration
To configure the library, you need to set the Weaviate API key in your application's configuration:
config :noizu_weaviate,
weaviate_api_key: "your_api_key_here"
Summary
Functions
A helper function to make API calls to the OpenAI API. This function handles both non-stream and stream API calls.
Types
api_response()
consistency_level_option()
@type consistency_level_option() :: String.t()
error_tuple()
@type error_tuple() :: {:error, details :: term()}
options()
@type options() :: map()
Functions
api_base()
api_call(type, url, body, model, options \\ nil)
A helper function to make API calls to the OpenAI API. This function handles both non-stream and stream API calls.
Parameters
- type: The HTTP request method (e.g., :get, :post, :put, :patch, :delete)
- url: The full URL for the API endpoint
- body: The request body in map format
- model: The model to be used for the response processing
- options
- stream: A boolean value to indicate whether the request should be processed as a stream or not (default: false)
- raw: return raw response
- response_log_callback: function(finch) callback for request log.
- response_log_callback: function(finch, start_ms) callback for response log.
Returns
Returns a tuple {:ok, response} on successful API call, where response is the decoded JSON response in map format. Returns {:error, term} on failure, where term contains error details.