Simple Deployment

Objective

The Simple Deployment architecture provides the most straightforward way to integrate Orq.ai into your application as an AI Gateway. This pattern serves as the primary entry point for routing LLM calls through the Orq.ai platform, enabling you to benefit from unified routing, monitoring, and security features while maintaining a clean separation between your application logic and AI model configurations.

Use Case

Simple Deployment is ideal for applications that need:

  • Single Model Integration: Applications requiring one primary LLM interaction pattern.
  • Straightforward AI Features: Chat interfaces, content generation, or text processing workflows.
  • Rapid Prototyping: Quick integration for testing AI capabilities in existing systems.
  • Centralized Management: Teams wanting to manage AI configurations outside of application code.
  • Standard LLM Operations: Text completion, chat completion, or simple prompt-response patterns.

Prerequisite

Before configuring a Simple Deployment, ensure you have:


Configuring a Deployment

To create a Deployment, head to the orq.ai Studio:

  • Choose a Project and Folder and select the + button.
  • Choose Deployment.

You should see a modal to configure your initial deployment where you can:

Configuring your Deployment, all parameters can be changed after creation.

Then configure your Deployment Variant, using the Prompt template, enter the messages that the model should reply to.

Configure here your model and messages.

Multiple parameters are available for your model, to learn more, see Model Parameters.

📘

Learn more about the possibilities of Prompts in Orq.ai, see Creating a Prompt.

👍

Choose Deploy once ready, this will make your newly created Deployment available through the API.

Integrating with the SDK

Choose your preferred programming language and install the corresponding SDK:

# pip
pip install orq-ai-sdk
# npm
npm install @orq-ai/node

Get your integration ready by initializing the SDK as follows:

import os

from orq_ai_sdk import Orq

client = Orq(
  api_key=os.environ.get("ORQ_API_KEY", "__API_KEY__"),
  environment="production",
  contact_id="contact_x123x" # optional
)
const deployment = await client.deployments.invoke({
   key: "myDeployment",
   context: {
      environments: []
   },
   metadata: {
      "custom-field-name": "custom-metadata-value"
   }
});

Calling the Deployment

To call the Deployment within your integration, use the following calls:

generation = client.deployments.invoke(
  key="myDeployment",
  context={
    "environments": []
  },
  metadata={
    "custom-field-name": "custom-metadata-value"
  }
)

print(generation.choices[0].message.content)
const deployment = await client.deployments.invoke({
   key: "myDeployment",
   context: {
      environments: []
   },
   metadata: {
      "custom-field-name": "custom-metadata-value"
   }
});

Viewing Logs

Going back to the Deployment page, you can view the calls made through the previously created application. You can view details for a single log by clicking on a log line. This opens a panel containing all the details for the log, including context, requests, and parameters sent to your Deployment.

📘

To learn more about logs see Logs.

👍

You completed basic common architecture for a Simple Deployment, explore more of our Cookbooks or other Architectures to see more complex architectures.