Open Models
Interact with custom or fine-tuned models using their unique identifier directly through the Knowledgator Python SDK.
Available Modules
- Generic Prediction — Call a model's base endpoint with a raw input payload.
- Method-based Inference — Invoke a specific named method on a model.
Example Usage
from knowledgator import Knowledgator
kg = Knowledgator(api_key="YOUR_API_KEY")
# Initialize the model client
model = kg.model("your-model-id")
# Generic prediction
response = model.predict({
"input": "text to process"
})
print(response)
# Method-based inference
generator = kg.model("your-model-id", method="generate")
response = generator.predict({
"prompt": "Tell me a story about a brave knight."
})
print(response)