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

Uploaded Python 3

File details

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

File metadata

  • Download URL: miriel_python-0.1.7.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.7.tar.gz
Algorithm Hash digest
SHA256 419d9b0937049541f5c0067abcb2c54fa4cfffa7edbfee975383a57fdec97f90
MD5 edd82d1e3952eaeac30e34f2158553db
BLAKE2b-256 da7b6d5e9b14eee4bab40a5f9c8ed62b98ab3ec92ad356e557e25dfa7ccfb2d7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: miriel_python-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 7.1 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.7-py3-none-any.whl
Algorithm Hash digest
SHA256 06f79402a2e0cca96647231284e15de22866902b68d28e50551b944531bc58f4
MD5 6f1c52ccf5ffd8f2344823115e5bc97b
BLAKE2b-256 d4d1e902cf93306a490731d47ebd69d509ddd1068c344f30e1f1538a288d6511

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