import requests from os import getenv API_URL = getenv('API_URL') BEARER = getenv('BEARER') headers = { "Authorization": f"Bearer {BEARER}", "Content-Type": "application/json" } def call_jais(payload): response = requests.post(API_URL, headers=headers, json=payload) return response.json() def generate(prompt: str): payload = {'inputs': '', 'prompt':prompt} response = call_jais(payload) return response