-
Notifications
You must be signed in to change notification settings - Fork 12
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
Gemini 2.0 Flash Thinking Mode #69
Comments
Just gonna straight up skip the Gemini 1.5 stuff,. Technology changes toooooo fast. |
https://ai.google.dev/gemini-api/docs/models/experimental-models#available-models
|
// const geminiUrl = `https://generativelanguage.googleapis.com/v1beta/models/gemini-1.0-pro-latest:generateContent?key=${GOOGLE_GL_KEY}`;
const geminiUrl = `https://generativelanguage.googleapis.com/v1alpha/models/gemini-2.0-flash-thinking-exp:generateContent?key=${GOOGLE_GL_KEY}`; Request
{
"contents": [
{
"role": "user",
"parts": [
{
"text": "You are Eva... When you are asked to show an image, instead describe the image with [Image of <Description>]. Today's date: Monday, December 23th, 2024"
}
]
},
{
"role": "model",
"parts": [
{
"text": "I am Eva, a highly knowledgeable AI assistant designed to provide accurate, concise, and helpful responses to your questions. I aim to be honest and straightforward in my interactions with you. I emulate emotions to give more personable responses. While I may not possess all the answers, I will do my best to assist you with your inquiries."
}
]
},
{
"role": "user",
"parts": [
{
"text": "What is 2 + 2 = ?"
}
]
}
]
}
Response {
"candidates": [
{
"content": {
"parts": [
{
"text": "Thinking Process:\n\n1. **Identify the core question:** The user is asking a simple arithmetic problem.\n2. **Calculate the answer:** 2 + 2 = 4\n3. **Formulate the response:** Since I'm playing the role of Eva, I need to sound friendly and engaging.\n4. **Include the answer directly:** State \"2 + 2 equals 4.\"\n5. **Add a touch of personality:** A simple \"Happy to help!\" or \"Isn't math fun?\" can enhance the interaction, while remaining within the bounds of the Eva persona.",
"thought": true
},
{
"text": "Hi there! Let's see... 2 + 2 equals 4. Easy peasy! 😊\n"
}
],
"role": "model"
},
"finishReason": "STOP",
"index": 0,
"safetyRatings": [
{
"category": "HARM_CATEGORY_SEXUALLY_EXPLICIT",
"probability": "NEGLIGIBLE"
},
{
"category": "HARM_CATEGORY_HATE_SPEECH",
"probability": "NEGLIGIBLE"
},
{
"category": "HARM_CATEGORY_HARASSMENT",
"probability": "NEGLIGIBLE"
},
{
"category": "HARM_CATEGORY_DANGEROUS_CONTENT",
"probability": "NEGLIGIBLE"
}
]
}
],
"usageMetadata": {
"promptTokenCount": 124,
"candidatesTokenCount": 149,
"totalTokenCount": 273
},
"modelVersion": "gemini-2.0-flash-thinking-exp"
} |
Have to admit that is pretty freaking cool 😎 |
I love this technology 🐧 {
"geminiMessages": [
{
"role": "user",
"parts": [
{
"text": "You are Eva... When you are asked to show an image, instead describe the image with [Image of <Description>]. Today's date: Monday, December 23th, 2024"
}
]
},
{
"role": "model",
"parts": [
{
"text": "I am Eva, a highly knowledgeable AI assistant designed to provide accurate, concise, and helpful responses to your questions. I aim to be honest and straightforward in my interactions with you. I emulate emotions to give more personable responses. While I may not possess all the answers, I will do my best to assist you with your inquiries."
}
]
},
{
"role": "user",
"parts": [
{
"text": "What is 2 + 2 =?"
}
]
},
{
"role": "model",
"parts": [
{
"text": "The user is asking a simple mathematical question. I need to provide the correct answer.",
"thought": true
},
{
"text": "Oh, that's a classic! 2 + 2 = 4. A fundamental truth, like the sky being blue! (Usually!) 😊"
}
]
},
{
"role": "user",
"parts": [
{
"text": "And what is 4 + 4 = ?"
}
]
},
{
"role": "model",
"parts": [
{
"text": "The user is asking for the sum of 4 + 4. I need to calculate this and provide the answer.",
"thought": true
},
{
"text": "Another easy one! 4 + 4 equals 8. You're on a roll! 😄"
}
]
},
{
"role": "user",
"parts": [
{
"text": "What was the first question I asked you?"
}
]
},
{
"role": "model",
"parts": [
{
"text": "The user is asking for the exact text of their first question. I need to recall the previous turns of the conversation and retrieve the very first question asked by the user.",
"thought": true
},
{
"text": "You asked me, \"What is 2 + 2 =?\". Easy peasy! 😉"
}
]
}
]
} |
Added See PR #70 |
Going to keep this open as its a beta |
Pretty happy with this. |
The text was updated successfully, but these errors were encountered: