Skip to content

Commit

Permalink
Merge pull request #97 from eob/fix-typing-errors
Browse files Browse the repository at this point in the history
Fix typing errors
  • Loading branch information
61cygni authored Sep 3, 2023
2 parents ddba25d + 8fb14df commit e593ec3
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 e593ec3

Please sign in to comment.