Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

are there roles in messages? #16

Open
rjsr213 opened this issue Dec 13, 2024 · 1 comment
Open

are there roles in messages? #16

rjsr213 opened this issue Dec 13, 2024 · 1 comment
Assignees
Labels
priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. type: question Request for information or clarification. Not an issue.

Comments

@rjsr213
Copy link

rjsr213 commented Dec 13, 2024

Hello, how do I indicate the role of each message? user, model, tool?

response = self.google.models.generate_content(
    model='gemini-2.0-flash-exp',
    contents=[
        types.Part.from_text("Hi i am the user"),
        types.Part.from_text("No, i am the user"),
    ],
    config=types.GenerateContentConfig(
        system_instruction=system_instructions,
        temperature= 0.3,
    ),
)
@rjsr213 rjsr213 added priority: p3 Desirable enhancement or fix. May not be included in next release. type: question Request for information or clarification. Not an issue. labels Dec 13, 2024
@happy-qiao
Copy link
Collaborator

If role is not set, SDK will use default role. See

return types.Content(role='user', parts=t_parts(client, content))

@sasha-gitg sasha-gitg added priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. and removed priority: p3 Desirable enhancement or fix. May not be included in next release. labels Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. type: question Request for information or clarification. Not an issue.
Projects
None yet
Development

No branches or pull requests

3 participants