diff --git a/src/app/api/steamship/route.ts b/src/app/api/steamship/route.ts index c68eff14..9ada2526 100644 --- a/src/app/api/steamship/route.ts +++ b/src/app/api/steamship/route.ts @@ -27,6 +27,11 @@ export async function POST(req: Request) { const { prompt, isText, userId, userName } = await req.json(); const companionName = req.headers.get("name"); + if (!companionName) { + console.log("ERROR: no companion name"); + return returnError(429, `Hi, please add a 'name' field in your headers specifying the Companion Name.`) + } + // Load the companion config const configManager = ConfigManager.getInstance(); const companionConfig = configManager.getConfig("name", companionName); diff --git a/src/components/QAModal.tsx b/src/components/QAModal.tsx index 8506e182..70fd78d7 100644 --- a/src/components/QAModal.tsx +++ b/src/components/QAModal.tsx @@ -37,7 +37,7 @@ export default function QAModal({ headers: { name: example.name }, }); - let [blocks, setBlocks] = useState(null) + let [blocks, setBlocks] = useState(null) useEffect(() => { // When the completion changes, parse it to multimodal blocks for display.