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.4.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.4-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for miriel_python-0.1.4.tar.gz
Algorithm Hash digest
SHA256 b703fb0a0c7a5a36b21ef21a2adda78ba18cca1606f4239126081dc2d8bff84b
MD5 c9f3b5f0336538e595b2f3077e65b3e0
BLAKE2b-256 82bc21608a421703987315009c0fa74ac2c7f607877d5e782e8cecf9c5f5a904

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for miriel_python-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 3c8e4f9aeeff45c93d24d6e14969a2412f3da3d8f1806320749e67d95a6b8876
MD5 6add69658f793c695589082f74fb8aa7
BLAKE2b-256 97e3e0fbf7b2f1f94b62d8fa4bcefcf14b92fa34a86307e62872d3fe29733c39

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