ਸੈੱਟਅੱਪ ਗਾਈਡ · API ਕੁੰਜੀ

OpenAI Responses API ਨਾਲ ਜੋੜੋ

Responses API ਵਰਤ ਕੇ ਆਪਣੀ ਐਪਲੀਕੇਸ਼ਨ ਤੋਂ ਰਿਮੋਟ MCP ਸਰਵਰ ਨੂੰ ਕਾਲ ਕਰੋ।

ਇੱਕ ਮੁਫ਼ਤ Hillbase ਖਾਤੇ ਨਾਲ ਸ਼ੁਰੂ ਕਰੋ। ਆਪਣੇ ਖਾਤੇ ਵਿੱਚ ਇੱਕ API ਕੁੰਜੀ ਬਣਾਓ ਅਤੇ ਇਸਨੂੰ ਨਿੱਜੀ ਰੱਖੋ।

Hillbase ਜੋੜੋ

  1. HILLBASE_API_KEY, OPENAI_API_KEY ਅਤੇ OPENAI_MODEL (ਰਿਮੋਟ MCP ਦਾ ਸਮਰਥਨ ਕਰਨ ਵਾਲਾ ਮਾਡਲ) ਐਕਸਪੋਰਟ ਕਰੋ। ਤੁਹਾਡੇ ਮਾਡਲ ਪ੍ਰਦਾਤਾ ਦੀ ਕੁੰਜੀ ਤੁਹਾਡੀ Hillbase ਕੁੰਜੀ ਤੋਂ ਵੱਖਰੀ ਹੈ।
  2. python -m pip install -U openai ਨਾਲ SDK ਇੰਸਟਾਲ ਕਰੋ ਅਤੇ ਹੇਠਲਾ ਕੋਡ hillbase_agent.py ਵਜੋਂ ਸੰਭਾਲੋ।
  3. python hillbase_agent.py ਚਲਾਓ। ਇਸ ਉਦਾਹਰਣ ਵਿੱਚ ਸਿਰਫ਼ address_profile ਚਾਲੂ ਹੈ; ਕੁੰਜੀ ਹਰ ਬੇਨਤੀ ’ਤੇ Bearer ਪ੍ਰਮਾਣ-ਪੱਤਰ ਵਜੋਂ ਭੇਜੀ ਜਾਂਦੀ ਹੈ।
Bash · ਆਪਣੀ Hillbase ਕੁੰਜੀ ਸੈੱਟ ਕਰੋ
# Paste the key shown once in your Hillbase account.
# Run in a private terminal; keep keys out of source control.
read -r -s -p "Hillbase API key: " HILLBASE_API_KEY; printf '\n'
export HILLBASE_API_KEY
Bash · SDK ਇੰਸਟਾਲ ਕਰੋ ਅਤੇ ਪ੍ਰਦਾਤਾ ਦੇ ਪ੍ਰਮਾਣ-ਪੱਤਰ ਸੈੱਟ ਕਰੋ
python -m pip install -U openai
read -r -s -p "OPENAI API key: " OPENAI_API_KEY; printf '\n'
export OPENAI_API_KEY
read -r -p "MCP-compatible model ID: " OPENAI_MODEL
export OPENAI_MODEL
# Save the Python example below as hillbase_agent.py, then run:
# python hillbase_agent.py
hillbase_agent.py
import os
from openai import OpenAI

response = OpenAI().responses.create(
    model=os.environ["OPENAI_MODEL"],
    input="Use Hillbase address_profile for point latitude 51.045417, longitude -114.055404, region AB, locality Calgary. Summarize the school assignments, transit and property context. Report each section's coverage status; do not treat unsupported or no_match as proof that something does not exist.",
    tools=[{
        "type": "mcp",
        "server_label": "hillbase",
        "server_url": "https://api.hillbase.com/mcp",
        "authorization": os.environ["HILLBASE_API_KEY"],
        "allowed_tools": ["address_profile"],
        "require_approval": "never",
    }],
)
print(response.output_text)

ਕਲਾਇੰਟ ਸੈਟਿੰਗਾਂ ਬਦਲ ਸਕਦੀਆਂ ਹਨ। ਮੌਜੂਦਾ ਕਲਾਇੰਟ ਲੋੜਾਂ ਲਈ Responses API ਰਿਮੋਟ MCP ਗਾਈਡ ਦੇਖੋ।

ਆਪਣਾ ਪਹਿਲਾ ਸਵਾਲ ਪੁੱਛੋ

ਪਹਿਲਾ ਪ੍ਰੋਂਪਟ
Use Hillbase address_profile for point latitude 51.045417, longitude -114.055404, region AB, locality Calgary. Summarize the school assignments, transit and property context. Report each section's coverage status; do not treat unsupported or no_match as proof that something does not exist.

ਹੇਠਲਾ ਸਥਿਰ ਅੰਸ਼ ਉਸੇ ਪਤਾ-ਪ੍ਰੋਫਾਈਲ API ਤੋਂ ਹੈ ਜੋ MCP ਟੂਲ ਵਰਤਦਾ ਹੈ। ਤੁਹਾਡੇ ਸਹਾਇਕ ਦੇ ਸ਼ਬਦ ਅਤੇ ਮੌਜੂਦਾ ਰਿਕਾਰਡ ਵੱਖਰੇ ਹੋ ਸਕਦੇ ਹਨ।

ਅਸਲ ਕੈਪਚਰ ਕੀਤਾ ਜਵਾਬ. ਚੋਣਵੇਂ ਜਵਾਬ ਖੇਤਰ ਅਤੇ ਸੂਚੀ ਆਈਟਮਾਂ ਦਿਖਾਈਆਂ ਗਈਆਂ ਹਨ। ਕੈਪਚਰ ਕੀਤੇ ਮੁੱਲ ਮੌਜੂਦਾ ਡੇਟਾ ਤੋਂ ਵੱਖਰੇ ਹੋ ਸਕਦੇ ਹਨ।

{
  "schema_version": "hillbase.v0",
  "data": {
    "point": {
      "lat": 51.045417,
      "lng": -114.055404
    },
    "sections": {
      "school_assignments": {
        "coverage": {
          "status": "supported",
          "outcome": "resolved"
        },
        "data": [
          {
            "school": {
              "name": "Bowcroft School"
            },
            "catchment": {
              "program": "German Bilingual Program (K-6)",
              "school_year": "2026-2027"
            }
          },
          {
            "school": {
              "name": "Glenmeadows School"
            },
            "catchment": {
              "program": "Spanish Bilingual Program (K-12)",
              "school_year": "2026-2027"
            }
          }
        ]
      },
      "transit": {
        "coverage": {
          "status": "supported",
          "outcome": "resolved"
        },
        "data": {
          "items": [
            {
              "name": "NB 3 ST @ 7 AV SE",
              "routes": [
                {
                  "short_name": "302",
                  "long_name": "BRT Southeast/City Centre"
                }
              ]
            },
            {
              "name": "NB 3 ST @ 7 AV SE",
              "routes": [
                {
                  "short_name": "1",
                  "long_name": "Bowness/Forest Lawn"
                },
                {
                  "short_name": "117",
                  "long_name": "McKenzie Towne Express"
                }
              ]
            }
          ]
        }
      },
      "zoning": {
        "coverage": {
          "status": "supported",
          "outcome": "resolved"
        },
        "data": {
          "items": [
            {
              "zone_code": "CC-ET",
              "zone_description": "Centre City East Village Transition"
            }
          ]
        }
      },
      "parks_nearby": {
        "coverage": {
          "status": "supported",
          "outcome": "resolved"
        },
        "data": {
          "items": [
            {
              "name": "OLYMPIC PLAZA",
              "park_type": "regional"
            },
            {
              "name": "PAGET PARK",
              "park_type": "local"
            }
          ]
        }
      }
    }
  },
  "coverage": {
    "status": "partial",
    "outcome": "resolved"
  },
  "retrieved_at": "2026-10-29T22:58:38.063675Z"
}
ਹਰ ਭਾਗ ਦੀ ਕਵਰੇਜ ਦੇਖੋ
{
  "air_quality": {
    "status": "partial",
    "outcome": "resolved"
  },
  "livability": {
    "status": "partial",
    "outcome": "resolved"
  },
  "traffic": {
    "status": "partial",
    "outcome": "resolved"
  },
  "waste_collection": {
    "status": "partial",
    "outcome": "no_match"
  },
  "road_restrictions": {
    "status": "stale",
    "outcome": "resolved"
  },
  "enforcement": {
    "status": "partial",
    "outcome": "resolved"
  },
  "collisions": {
    "status": "unsupported",
    "outcome": "no_match"
  },
  "climate_projections": {
    "status": "unsupported",
    "outcome": "no_match"
  },
  "building_energy": {
    "status": "unsupported",
    "outcome": "no_match"
  },
  "site_conditions": {
    "status": "partial",
    "outcome": "resolved"
  },
  "nearby_industrial_emitters": {
    "status": "partial",
    "outcome": "resolved"
  },
  "economy": {
    "status": "supported",
    "outcome": "resolved"
  },
  "health_facility_status": {
    "status": "unsupported",
    "outcome": "no_match"
  },
  "health_indicators": {
    "status": "supported",
    "outcome": "resolved"
  },
  "housing_market": {
    "status": "supported",
    "outcome": "resolved"
  },
  "development_nearby": {
    "status": "supported",
    "outcome": "resolved"
  },
  "land_constraints": {
    "status": "partial",
    "outcome": "resolved"
  },
  "school_assignments": {
    "status": "supported",
    "outcome": "resolved"
  },
  "schools_nearby": {
    "status": "supported",
    "outcome": "resolved"
  },
  "amenities": {
    "status": "supported",
    "outcome": "resolved"
  },
  "permits_nearby": {
    "status": "supported",
    "outcome": "resolved"
  },
  "transit": {
    "status": "supported",
    "outcome": "resolved"
  },
  "regulated_businesses_nearby": {
    "status": "supported",
    "outcome": "resolved"
  },
  "businesses_nearby": {
    "status": "supported",
    "outcome": "resolved"
  },
  "facilities_nearby": {
    "status": "supported",
    "outcome": "resolved"
  },
  "community_services": {
    "status": "supported",
    "outcome": "resolved"
  },
  "parcel": {
    "status": "supported",
    "outcome": "resolved"
  },
  "zoning": {
    "status": "supported",
    "outcome": "resolved"
  },
  "hazards": {
    "status": "unsupported",
    "outcome": "no_match"
  },
  "property_values": {
    "status": "supported",
    "outcome": "no_match"
  },
  "demographics": {
    "status": "supported",
    "outcome": "resolved"
  },
  "parks_nearby": {
    "status": "supported",
    "outcome": "resolved"
  },
  "crime": {
    "status": "supported",
    "outcome": "resolved"
  }
}

ਜਵਾਬ ਦੀ ਜਾਂਚ ਕਰੋ

ਹਰ ਭਾਗ ਦਾ coverage.status ਅਤੇ coverage.outcome ਪੜ੍ਹੋ। ਅੰਸ਼ਕ ਜਾਂ ਅਸਮਰਥਿਤ ਭਾਗ ਇਸ ਗੱਲ ਦਾ ਸਬੂਤ ਨਹੀਂ ਕਿ ਕੋਈ ਰਿਕਾਰਡ ਮੌਜੂਦ ਨਹੀਂ। ਜੇ ਕਨੈਕਸ਼ਨ 401 ਵਾਪਸ ਕਰੇ, ਤਾਂ ਜਾਂਚੋ ਕਿ ਐਕਸਪੋਰਟ ਕੀਤੀ ਕੁੰਜੀ ਸਰਗਰਮ ਹੈ ਅਤੇ ਤੁਹਾਡੇ ਕਲਾਇੰਟ ਨੂੰ ਮਿਲ ਰਹੀ ਹੈ। 429 ਜਵਾਬ ਵਿੱਚ Retry-After ਹੈਡਰ ਹੁੰਦਾ ਹੈ।

ਆਪਣੇ ਖਾਤੇ ਵਿੱਚ ਕੁੰਜੀ ਰੱਦ ਕਰੋ ਅਤੇ ਆਪਣੀ ਸਥਾਨਕ ਸੰਰਚਨਾ ਅੱਪਡੇਟ ਕਰੋ। ਕਨੈਕਸ਼ਨ ਤੁਹਾਡੇ Hillbase ਪਲਾਨ ਦੇ ਕ੍ਰੈਡਿਟ ਵਰਤਦੇ ਹਨ।

ਅੱਗੇ: CSV ਦੀ ਪੁੱਛਗਿੱਛ ਕਰੋ, Signal ਸੰਭਾਲੋ ਜਾਂ ਐਂਡਪੁਆਇੰਟ ਹਵਾਲਾ ਦੇਖੋ।