Skip to content

Commit 2fb2795

Browse files
committed
Remove request.systemInstruction validation
We only define system prompts via onDeviceParams initialization.
1 parent b898cd0 commit 2fb2795

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

packages/vertexai/src/methods/chrome-adapter.ts

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -141,25 +141,6 @@ export class ChromeAdapter {
141141
}
142142
}
143143

144-
if (request.systemInstruction) {
145-
const systemContent = request.systemInstruction as Content;
146-
// Returns false if the role can't be represented on-device.
147-
if (systemContent.role && systemContent.role === 'function') {
148-
return false;
149-
}
150-
151-
// Returns false if the system prompt is multi-part.
152-
if (systemContent.parts && systemContent.parts.length > 1) {
153-
return false;
154-
}
155-
156-
// Returns false if the system prompt isn't text.
157-
const systemText = request.systemInstruction as TextPart;
158-
if (!systemText.text) {
159-
return false;
160-
}
161-
}
162-
163144
return true;
164145
}
165146

0 commit comments

Comments
 (0)