Sign inSign up

schogini/voiceflow-query

By schogini

Updated almost 2 years ago

Queries the VoiceFlow API using a provided question string.

Image
0

414

schogini/voiceflow-query repository overview

Schogini VoiceFlow Query Docker Image

This Docker image runs a Python script that queries the VoiceFlow API using a provided question string. The query is sent to the API, and the JSON response is pretty-printed in the terminal. The authorization key is passed via an environment variable.

Features

  • Sends a query to the VoiceFlow API.
  • Outputs the response in pretty-formatted JSON.
  • Authorization key is passed securely as an environment variable.
  • Supports dynamic query questions provided via command-line parameters.

Prerequisites

  • Docker installed on your machine.
  • VoiceFlow API authorization key.

How to Use

1. Build the Docker Image

Clone the repository or make sure you have all necessary files (Dockerfile and voiceflow_query.py) and run the following command to build the Docker image:

docker build -t voiceflow-query .
2. Run the Docker Container

To run the container and pass the query question as a command-line parameter, use the following command:

docker run --rm -e AUTHORIZATION_CODE="your-auth-key" voiceflow-query "<query-question>"

Replace:

  • "your-auth-key" with your actual authorization key.
  • "<query-question>" with your query (e.g., "Who are the doctors?").
Example Command
docker run --rm -e AUTHORIZATION_CODE="your-auth-key" voiceflow-query "Who are the doctors?"

This will output the following (formatted JSON):

{
    "output": "- Dr. Ananya Sharma - Specialization General Dentistry - Experience 10 years - Availability Monday, Wednesday, Friday - 9 AM to 5 PM\n\n- Dr. Rajesh Kapoor - Specialization Cosmetic Dentistry - Experience 8 years - Availability Tuesday, Thursday - 10 AM to 6 PM\n\n- Dr. Priya Menon - Specialization Orthodontics - Experience 12 years - Availability Monday, Tuesday, Wednesday, Thursday, Friday - 9 AM to 3 PM\n\n- Dr. Vikram Singh - Specialization Emergency Dental Care - Experience 15 years - Availability On Call",
    "tokens": 614,
    "queryTokens": 603,
    "answerTokens": 11,
    "model": "claude-instant-v1",
    "multiplier": 0.4,
    "duration": 0,
    "chunks": [
        {
            "score": 0.32987404,
            "chunkID": "ce0a36b2-846e-11ef-8d3a-16e9317c5cf5",
            "documentID": "66f542d81219efea285046d6",
            "content": "General Information: ABC Dental Clinic...",
            "source": {
                "type": "url",
                "name": "ai-client.schogini.com/kbl.php?id=Test_Inc|30793a462123eb9c097c93ac200d5e54|1506",
                "url": "https://ai-client.schogini.com/kbl.php?id=Test_Inc|30793a462123eb9c097c93ac200d5e54|1506",
                "refreshRate": "never"
            }
        },
        ...
    ]
}
Environment Variables
  • AUTHORIZATION_CODE: The API key used for authentication with the VoiceFlow API. This should be passed as an environment variable.

License

This project is licensed under the MIT License.

Company Information

This Docker image was created by Schogini Systems Private Limited. We specialize in AI Chatbot and Automation solutions for small businesses.

For more information about our services, visit: https://www.schogini.com.

Tag summary

Content type

Image

Digest

sha256:d9c5544f6

Size

49 MB

Last updated

almost 2 years ago

docker pull schogini/voiceflow-query