Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/models/generative_models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ export class GenerativeModel {
* @param request - {@link StartChatParams}
* @returns {@link ChatSession}
*/
startChat(request?: StartChatParams): ChatSession {
async startChat(request?: StartChatParams): Promise<ChatSession> {
const startChatRequest: StartChatSessionRequest = {
project: this.project,
location: this.location,
Expand All @@ -273,6 +273,7 @@ export class GenerativeModel {
startChatRequest.systemInstruction =
request.systemInstruction ?? this.systemInstruction;
}
await this.fetchToken();
return new ChatSession(startChatRequest, this.requestOptions);
}
}
Expand Down
Loading