Files
wehub-resource-sync 86db9aae8e
Documentation / build (push) Has been cancelled
Documentation / deploy (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 13:34:55 +08:00

25 lines
630 B
Python

""" Example script for using the Cohere Command R model. """
from llmware.models import ModelCatalog
def main():
""" Demonstrates loading and using the Cohere Command R model. """
model_name = "command-r"
# Load the model using ModelCatalog
model = ModelCatalog().load_model(model_name)
# Define a prompt for inference
prompt = "Explain the theory of relativity in simple terms."
# Perform inference
response = model.inference(prompt)
# Print the response
print("LLM Response:", response["llm_response"])
print("Usage:", response["usage"])
if __name__ == "__main__":
main()