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.5.tar.gz (6.7 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.5-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: miriel_python-0.1.5.tar.gz
  • Upload date:
  • Size: 6.7 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.5.tar.gz
Algorithm Hash digest
SHA256 2e4263dcd7ac1a97bf94ef4336e1d278c8f95d26212cf95d6258618bdad9b7c1
MD5 e8a8ab13358f6cc33a659dab0390ec4d
BLAKE2b-256 bf93316b3df0d8c85799c2423d9e093445a0f485b82798eea15c57fc74f354c9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: miriel_python-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 6.8 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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 233fe5165b7201ea5c2a6581052f35196c9e8f35ae7b54756f0fb6f954632aaf
MD5 dfc363c4f15c4a4dbb4e92110986a2f0
BLAKE2b-256 915122d9b473601b2d7e59b83e491c6913cd4f4231895723bdcd790c3891623e

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