mirror of
https://github.com/open-webui/pipelines
synced 2025-06-26 18:15:58 +00:00
Merge pull request #194 from rotemdan/use-native-system-message-for-gemini-1.5
Use native system instructions for Gemini 1.5 models
This commit is contained in:
commit
caa5421131
@ -2,7 +2,7 @@
|
||||
title: Google GenAI Manifold Pipeline
|
||||
author: Marc Lopez (refactor by justinh-rahb)
|
||||
date: 2024-06-06
|
||||
version: 1.2
|
||||
version: 1.3
|
||||
license: MIT
|
||||
description: A pipeline for generating text using Google's GenAI models in Open-WebUI.
|
||||
requirements: google-generativeai
|
||||
@ -128,6 +128,9 @@ class Pipeline:
|
||||
"parts": [{"text": message["content"]}]
|
||||
})
|
||||
|
||||
if "gemini-1.5" in model_id:
|
||||
model = genai.GenerativeModel(model_name=model_id, system_instruction=system_message)
|
||||
else:
|
||||
if system_message:
|
||||
contents.insert(0, {"role": "user", "parts": [{"text": f"System: {system_message}"}]})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user