Skip to main content

Method-based Inference

Call a specific method on a custom or fine-tuned model using the Knowledgator Python SDK.


Example Usage​

from knowledgator import Knowledgator

kg = Knowledgator(api_key="YOUR_API_KEY")

# Initialize model client with a specific method
generator = kg.model("your-model-id", method="generate")

# Invoke the method
response = generator.predict({
"prompt": "Tell me a story about a brave knight."
})

print(response)