Skip to content

Commit fd8abc5

Browse files
🐛 FIX: Google error (#33)
1 parent 5b84a31 commit fd8abc5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/baseai/src/dev/providers/google/chatComplete.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,12 +208,12 @@ export const GoogleChatCompleteResponseTransform: (
208208
role: 'assistant',
209209
content: ''
210210
};
211-
if (generation.content.parts[0]?.text) {
211+
if (generation.content?.parts[0]?.text) {
212212
message = {
213213
role: 'assistant',
214214
content: generation.content.parts[0]?.text
215215
};
216-
} else if (generation.content.parts[0]?.functionCall) {
216+
} else if (generation.content?.parts[0]?.functionCall) {
217217
message = {
218218
role: 'assistant',
219219
tool_calls: [

0 commit comments

Comments
 (0)