yogeshojha / rengine

reNgine is an automated reconnaissance framework for web applications with a focus on highly configurable streamlined recon process via Engines, recon data correlation and organization, continuous monitoring, backed by a database, and simple yet intuitive User Interface. reNgine makes it easy for penetration testers to gather reconnaissance with minimal configuration and with the help of reNgine's correlation, it just makes recon effortless.
https://yogeshojha.github.io/rengine/
GNU General Public License v3.0
7.53k stars 1.14k forks source link

feat: What about adding support for Groq, Antropic, Google AI, and more with simple curl? #1461

Open zinwelzl opened 1 week ago

zinwelzl commented 1 week ago

Is there an existing feature or issue for this?

Expected feature

What about adding support for Groq, Antropic, Google AI, and more with simple curl?

Here are some simple curl commands to connect to the APIs of OpenAI, Groq, Anthropic, and Google AI:

Example Usage (General Structure):

curl -X POST \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{""}'

OpenAI

curl -X POST "https://api.openai.com/v1/engines/davinci-codex/completions" \
     -H "Content-Type: application/json" \
     -H "Authorization: Bearer YOUR_OPENAI_API_KEY" \
     -d '{
           "prompt": "Translate the following text to French: 'Hello, world!'",
           "max_tokens": 60
         }'

Groq

curl -X POST "https://api.groq.com/openai/v1/chat/completions" \
     -H "Content-Type: application/json" \
     -H "Authorization: Bearer YOUR_GROQ_API_KEY" \
     -d '{
           "model": "groq-model",
           "messages": [
             {"role": "system", "content": "You are a helpful AI assistant."},
             {"role": "user", "content": "Tell me a joke."}
           ],
           "response_format": {"type": "json_schema", "json_schema": {"name": "joke_response", "schema": {"type": "object", "properties": {"joke": {"type": "string"}}, "required": ["joke"]}}},
           "temperature": 0.7,
           "max_tokens": 50,
           "stream": false
         }'

Anthropic

curl -X POST "https://api.anthropic.com/v1/chat/completions" \
     -H "Content-Type: application/json" \
     -H "Authorization: Bearer YOUR_ANTHROPI_API_KEY" \
     -d '{
           "prompt": "What is the capital of France?",
           "max_tokens": 60
         }'

Google AI

curl -X POST "https://ai.googleapis.com/v1/projects/YOUR_PROJECT_ID/models/YOUR_MODEL_ID/versions/YOUR_VERSION_ID:predict" \
     -H "Content-Type: application/json" \
     -H "Authorization: Bearer YOUR_GOOGLE_AI_API_KEY" \
     -d '{
           "instances": [
             {"input": {"text": "Translate the following text to French: 'Hello, world!'"}}
           ]
         }'

Alternative solutions

No response

Anything else?

No response

github-actions[bot] commented 1 week ago

Hey @zinwelzl! πŸš€ Thanks for this exciting feature idea!

We love seeing fresh concepts that could take reNgine to the next level. 🌟

To help us understand your vision better, could you:

πŸ“ Provide a detailed description of the feature 🎯 Explain the problem it solves or the value it adds πŸ’‘ Share any implementation ideas you might have

Your input is invaluable in shaping the future of reNgine. Let's innovate together! πŸ’ͺ