Skip to content

Commit

Permalink
setupPromptId can no longer return null
Browse files Browse the repository at this point in the history
  • Loading branch information
stefl committed Aug 28, 2024
1 parent 5a3c6b9 commit 0cfd322
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/aila/src/features/generation/AilaGeneration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export class AilaGeneration {
return this._chat;
}

public async setupPromptId(): Promise<string | null> {
public async setupPromptId(): Promise<string> {
if (!this._promptId) {
this._promptId = await this.fetchPromptId();
}
Expand Down Expand Up @@ -146,7 +146,7 @@ export class AilaGeneration {
this._totalTokens = this._promptTokens + this._completionTokens;
}

private async fetchPromptId(): Promise<string | null> {
private async fetchPromptId(): Promise<string> {
const appSlug = "lesson-planner";
const promptSlug = "generate-lesson-plan";
const responseMode = "interactive";
Expand Down Expand Up @@ -184,6 +184,6 @@ export class AilaGeneration {
"Prompt not found - please run pnpm prompts or pnpm prompts:dev in development",
);
}
return prompt?.id;
return prompt.id;
}
}

0 comments on commit 0cfd322

Please sign in to comment.