Skip to main content
Glama
workflow.py689 B
""" Lambda handler for txtai workflows """ import json from txtai.api import API APP = None # pylint: disable=W0603,W0613 def handler(event, context): """ Runs a workflow using input event parameters. Args: event: input event context: input context Returns: Workflow results """ # Create (or get) global app instance global APP APP = APP if APP else API("config.yml") # Get parameters from event body event = json.loads(event["body"]) # Run workflow and return results return {"statusCode": 200, "headers": {"Content-Type": "application/json"}, "body": list(APP.workflow(event["name"], event["elements"]))}

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/neuml/txtai'

If you have feedback or need assistance with the MCP directory API, please join our Discord server