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

Link to this type

api_response()

@type api_response() :: {:ok, map()} | {:error, any()}
Link to this type

consistency_level_option()

@type consistency_level_option() :: String.t()
Link to this type

error_tuple()

@type error_tuple() :: {:error, details :: term()}
@type options() :: map()

Functions

Link to this function

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.

Link to this function

generic_stream_provider(callback)

Link to this function

put_field(body, field, options, default \\ nil)

Link to this function

weaviate_base()