Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Google's Gemini AI in QB64
#7
A look at the JSON that gets sent to 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

Reply


Messages In This Thread
Google's Gemini AI in QB64 - by SpriggsySpriggs - 09-03-2024, 06:34 PM
RE: Google's Gemini AI in QB64 - by LEM - 09-03-2024, 09:24 PM
RE: Google's Gemini AI in QB64 - by Pete - 09-04-2024, 02:52 AM
RE: Google's Gemini AI in QB64 - by Dav - 09-04-2024, 11:29 AM
RE: Google's Gemini AI in QB64 - by SpriggsySpriggs - 09-04-2024, 11:56 AM
RE: Google's Gemini AI in QB64 - by bplus - 09-06-2024, 09:24 PM
RE: Google's Gemini AI in QB64 - by TerryRitchie - 09-07-2024, 12:10 AM
RE: Google's Gemini AI in QB64 - by Pete - 09-07-2024, 12:36 AM
RE: Google's Gemini AI in QB64 - by SMcNeill - 09-07-2024, 04:51 AM
RE: Google's Gemini AI in QB64 - by Pete - 09-07-2024, 09:13 PM
RE: Google's Gemini AI in QB64 - by SMcNeill - 09-07-2024, 10:56 PM
RE: Google's Gemini AI in QB64 - by Pete - 09-08-2024, 03:06 PM
RE: Google's Gemini AI in QB64 - by Kernelpanic - 09-09-2024, 09:38 PM
RE: Google's Gemini AI in QB64 - by TerryRitchie - 09-09-2024, 11:03 PM
RE: Google's Gemini AI in QB64 - by Kernelpanic - 09-10-2024, 01:45 PM
RE: Google's Gemini AI in QB64 - by Kernelpanic - 09-10-2024, 05:33 PM
RE: Google's Gemini AI in QB64 - by Pete - 09-24-2024, 02:46 AM
RE: Google's Gemini AI in QB64 - by gaslouk - 09-24-2024, 03:43 AM
RE: Google's Gemini AI in QB64 - by JRace - 09-24-2024, 04:41 AM
RE: Google's Gemini AI in QB64 - by Pete - 09-24-2024, 05:40 AM
RE: Google's Gemini AI in QB64 - by JRace - 09-24-2024, 06:12 AM
RE: Google's Gemini AI in QB64 - by Pete - 09-24-2024, 08:12 AM



Users browsing this thread: 8 Guest(s)