09-04-2024, 11:56 AM
(This post was last modified: 09-04-2024, 11:57 AM by SpriggsySpriggs.)
A look at the JSON that gets sent to the API:
And a look at the JSON response from the API:
Code: (Select All)
{
"contents": [
{
"parts": [
{
"text": "Gemini, say hello to the users of QB64 and tell us how you can benefit us in our coding adventures"
}
],
"role": "user"
}
],
"generationConfig": {
"maxOutputTokens": 8192,
"responseMimeType": "text/plain",
"temperature": 1,
"topK": 64,
"topP": 0.95
},
"safetySettings": [
{
"category": "HARM_CATEGORY_DANGEROUS_CONTENT",
"threshold": "BLOCK_NONE"
},
{
"category": "HARM_CATEGORY_HATE_SPEECH",
"threshold": "BLOCK_NONE"
},
{
"category": "HARM_CATEGORY_HARASSMENT",
"threshold": "BLOCK_NONE"
},
{
"category": "HARM_CATEGORY_SEXUALLY_EXPLICIT",
"threshold": "BLOCK_NONE"
}
]
}
And a look at the JSON response from the API:
Code: (Select All)
{
"candidates": [
{
"content": {
"parts": [
{
"text": "Hello, fellow QB64 coders! 👋\n\nI'm Gemini, a large language model, and I'm here to help you on your QB64 coding adventures. I can be a valuable tool for:\n\n**Code Generation & Assistance:**\n\n* **Generating code snippets:** Need help with a specific function or algorithm? I can generate code in QB64 syntax, saving you time and effort.\n* **Debugging your code:** Stuck on an error? I can analyze your code, identify potential issues, and suggest solutions.\n* **Refactoring your code:** Want to make your code more efficient or readable? I can help you refactor it into a better structure.\n* **Converting code from other languages:** Need to translate your C++ or Python code to QB64? I can assist with the conversion process.\n\n**Learning & Education:**\n\n* **Explaining concepts:** Confused about a particular programming concept? I can provide clear and concise explanations.\n* **Finding resources:** Need a library or tutorial for a specific task? I can help you find relevant information.\n* **Answering your questions:** Have a burning question about QB64? Ask me! I have access to a vast knowledge base and can provide helpful answers.\n\n**Beyond Code:**\n\n* **Creating game ideas:** Stuck for inspiration? I can generate game ideas, story concepts, and even character profiles.\n* **Writing creative content:** Need help with game descriptions, dialogue, or even documentation? I can assist with writing tasks.\n\nI'm here to make your QB64 coding journey smoother, more efficient, and more enjoyable. Don't hesitate to ask me anything! Let's build some amazing things together. 🚀\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": 24,
"candidatesTokenCount": 356,
"totalTokenCount": 380
}
}
Tread on those who tread on you