Skip to main content

Library for interacting with the Miriel API

Project description

Miriel Python Client

This is the official Python client library for interacting with the Miriel API.

Installation

You can install the Miriel Python client using pip:

pip install .

in the directory into which you cloned this repo.

Basic Usage

To use the Miriel Python client, you need to have an API key. You can get your API key by signing up for an account on the Miriel website.

Once you have your API key, you can use the client to interact with the API. Here is an example of how to use the client:

from miriel import Miriel

# Initialize the client with your API key
miriel_client = Miriel(api_key="your_api_key")

#add data
miriel_client.learn("The Founders of Miriel are David Garcia, Josh Paulson, and Andrew Barkett")

#Query the documents
query_response = miriel_client.query("Who are the founders of Miriel?")
print(f"Query response: {query_response}")

Calling search with an image

    ...
    query_response = miriel_client.query("What does this image show?", input_images="https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg")
    print(f"Query response: {query_response}")

Calling with a structured output

    ...

    #define a schema for the structured output
    output_schema = {
        "founders" : ["string"],
        "number_of_founders": "integer"
    }
    query_response = miriel_client.query("Who are the founders of Miriel?", response_format=output_schema)
    print(f"Query response: {query_response}")

Only "integer", "float", "string", "boolean", "array" (list), and "object" (dict) are supported. Default values not yet supported.

Documentation

For more details on the API, see the API Documentation.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

miriel_python-0.1.10.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

miriel_python-0.1.10-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file miriel_python-0.1.10.tar.gz.

File metadata

  • Download URL: miriel_python-0.1.10.tar.gz
  • Upload date:
  • Size: 7.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.23

File hashes

Hashes for miriel_python-0.1.10.tar.gz
Algorithm Hash digest
SHA256 3544030fc456beec3ae15fab99975368cafb8551d56599fc77f03deb15357c6e
MD5 6d8602437348e91380509dc34041c551
BLAKE2b-256 219eda8345651d6072cde8dd422ef09580ed4a711cc6bf30c58e2591da28c35a

See more details on using hashes here.

File details

Details for the file miriel_python-0.1.10-py3-none-any.whl.

File metadata

  • Download URL: miriel_python-0.1.10-py3-none-any.whl
  • Upload date:
  • Size: 8.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.23

File hashes

Hashes for miriel_python-0.1.10-py3-none-any.whl
Algorithm Hash digest
SHA256 eb2112bca1c5388156a56e563c9c95bf48adc605d2ce02d9f27376bd8dcf1c69
MD5 5d2cf8bde491ecf313c6618cf4cff862
BLAKE2b-256 0aa34911d882805c55200d86878bb07648de3c4f73f78def7ef8ef971fe7d621

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page