google-gemini / generative-ai-js

The official Node.js / Typescript library for the Google Gemini API
https://www.npmjs.com/package/@google/generative-ai
Apache License 2.0
685 stars 143 forks source link

no System instructions #95

Closed JasonQWJ closed 5 months ago

JasonQWJ commented 5 months ago

Expected Behavior

System instructions enable users to steer the behavior of the model based on their specific needs and use cases. When you set a system instruction, you give the model additional context to understand the task, provide more customized responses, and adhere to specific guidelines over the full user interaction with the model. For developers, product-level behavior can be specified in system instructions, separate from prompts provided by end users.

You can use system instructions in many ways, including:

Defining a persona or role (for a chatbot, for example) Defining output format (Markdown, YAML, etc.) Defining output style and tone (for example, verbosity, formality, and target reading level) Defining goals or rules for the task (for example, returning a code snippet without further explanations) Providing additional context for the prompt (for example, a knowledge cutoff) When a system instruction is set, it applies to the entire request. It works across multiple user and model turns when included in the prompt. System instructions are part of your overall prompts and therefore are subject to standard data use policies.

Actual Behavior

no System instructions

JasonQWJ commented 5 months ago

ccdc4f8a4bd999d5e6ccc9d5c66c4f4720df8fa2