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.6.tar.gz (6.9 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.6-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: miriel_python-0.1.6.tar.gz
  • Upload date:
  • Size: 6.9 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.6.tar.gz
Algorithm Hash digest
SHA256 dd5eb76e14af064bc44cf8fce0f5947a275549aadd79296d6986f0b5a3691ea2
MD5 eb5d3425f4aae813cd0c06c194db92d4
BLAKE2b-256 51a32165f96252add88821dcdd32721419551646e80e0dad5990a39d08c9875d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: miriel_python-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 7.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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 4db26d7afd1efb6fbd52fe6da6c0348e7e6d4335c1b18e55b0506404ef6d3b67
MD5 030cccdda63c8d4191f863730de0307e
BLAKE2b-256 ad9b3605f93e30bfb5bfb2a1ea51ed88300ea9af28543739d5d92ac23c21497c

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