Skip to content

Commit

Permalink
Fix typing errors
Browse files Browse the repository at this point in the history
  • Loading branch information
eob committed Sep 3, 2023
1 parent ddba25d commit 8fb14df
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/app/api/steamship/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/components/QAModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export default function QAModal({
headers: { name: example.name },
});

let [blocks, setBlocks] = useState<ChatBlock[] | null>(null)
let [blocks, setBlocks] = useState<any[] | null>(null)

useEffect(() => {
// When the completion changes, parse it to multimodal blocks for display.
Expand Down

0 comments on commit 8fb14df

Please sign in to comment.