Skip to content
This repository has been archived by the owner on Apr 24, 2024. It is now read-only.

Commit

Permalink
Add GroqCloud models and groq-sdk dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
MrlolDev committed Mar 2, 2024
1 parent 93aea72 commit 6bac4ce
Show file tree
Hide file tree
Showing 17 changed files with 417 additions and 299 deletions.
4 changes: 4 additions & 0 deletions docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@
"OpenAI models",
"/text/gpt-new"
],
[
"GroqCloud models",
"/text/groq"
],
[
"OpenChat models",
"/text/openchat"
Expand Down
8 changes: 4 additions & 4 deletions docs/image/sh/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ POST *https://api.turing.sh/image/sh*
- **model**
- Type: string
- Required: false
- Options: Deliberate, Anything Diffusion, stable_diffusion, ICBINP - I Can't Believe It's Not Photography, ChilloutMix, majicMIX realistic, Dreamshaper, URPM, Hentai Diffusion, CamelliaMix 2.5D, BB95 Furry Mix, Counterfeit, iCoMix, Abyss OrangeMix, Realistic Vision, BRA, Epic Diffusion, GTA5 Artwork Diffusion, Liberty, RealBiter, Zeipher Female Model, Analog Madness, stable_diffusion_2.1, HRL, Rev Animated, Anygen, Furry Epoch, Neurogen, Hassanblend, Dreamlike Photoreal, Project Unreal Engine 5, Arcane Diffusion, OpenJourney Diffusion, SDXL_beta::stability.ai#6901
- Default: SDXL_beta::stability.ai#6901
- Options: SDXL 1.0, AlbedoBase XL (SDXL), ICBINP XL, TURBO XL, Fustercluck, stable_cascade
- Default: stable_cascade

- **nsfw**
- Type: boolean
Expand Down Expand Up @@ -123,7 +123,7 @@ POST *https://api.turing.sh/image/sh*
"steps": 50,
"number": 1,
"sampler": "k_lms",
"model": "SDXL_beta::stability.ai#6901",
"model": "stable_cascade",
"stream": true
},
})
Expand All @@ -146,7 +146,7 @@ POST *https://api.turing.sh/image/sh*
"steps": 50,
"number": 1,
"sampler": "k_lms",
"model": "SDXL_beta::stability.ai#6901",
"model": "stable_cascade",
"stream": true
}),
)
Expand Down
21 changes: 15 additions & 6 deletions docs/image/vision/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,21 @@ POST *https://api.turing.sh/image/vision*
- Type: array
- Required: true
- Description: Model to use for the analysis
- Options: blip2, ocr
- Default: blip2
- Options: blip2, ocr, gemini
- Default: gemini

- **image**
- Type: string
- Required: true
- Description: Image URL for the model to process

- **typeImage**
- Type: string
- Required: false
- Description: Type of image to process
- Options: anything, person
- Default: anything

## Response


Expand Down Expand Up @@ -55,9 +62,10 @@ POST *https://api.turing.sh/image/vision*
},
data: {
"model": [
"blip2"
"gemini"
],
"image": "string"
"image": "string",
"typeImage": "anything"
},
})
})();
Expand All @@ -74,9 +82,10 @@ POST *https://api.turing.sh/image/vision*
},
data=json.dumps({
"model": [
"blip2"
"gemini"
],
"image": "string"
"image": "string",
"typeImage": "anything"
}),
)
```
Expand Down
6 changes: 3 additions & 3 deletions docs/text/google/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ POST *https://api.turing.sh/text/google*
- Type: string
- Required: false
- Description: ID of the conversation (used for data saving)
- Default: 884db9f0-3655-4068-b498-48ca11ca1f6e
- Default: bfb34ea4-dc9d-4f8e-b07d-e169e113d951

## Response

Expand Down Expand Up @@ -72,7 +72,7 @@ POST *https://api.turing.sh/text/google*
"model": "gemini-pro",
"max_tokens": 512,
"temperature": 0.9,
"id": "884db9f0-3655-4068-b498-48ca11ca1f6e"
"id": "bfb34ea4-dc9d-4f8e-b07d-e169e113d951"
},
})
})();
Expand All @@ -92,7 +92,7 @@ POST *https://api.turing.sh/text/google*
"model": "gemini-pro",
"max_tokens": 512,
"temperature": 0.9,
"id": "884db9f0-3655-4068-b498-48ca11ca1f6e"
"id": "bfb34ea4-dc9d-4f8e-b07d-e169e113d951"
}),
)
```
Expand Down
6 changes: 3 additions & 3 deletions docs/text/gpt-new/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ POST *https://api.turing.sh/text/gpt-new*
- Type: string
- Required: false
- Description: ID of the conversation (used for data saving)
- Default: 285fd172-6e70-4caf-a7cc-e9d25e318726
- Default: b62f4cc5-0a7b-4044-9267-065c63c24469

## Response

Expand Down Expand Up @@ -81,7 +81,7 @@ POST *https://api.turing.sh/text/gpt-new*
"max_tokens": 512,
"temperature": 0.9,
"plugins": [],
"id": "285fd172-6e70-4caf-a7cc-e9d25e318726"
"id": "b62f4cc5-0a7b-4044-9267-065c63c24469"
},
})
})();
Expand All @@ -102,7 +102,7 @@ POST *https://api.turing.sh/text/gpt-new*
"max_tokens": 512,
"temperature": 0.9,
"plugins": [],
"id": "285fd172-6e70-4caf-a7cc-e9d25e318726"
"id": "b62f4cc5-0a7b-4044-9267-065c63c24469"
}),
)
```
Expand Down
99 changes: 99 additions & 0 deletions docs/text/groq/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
---
title: GroqCloud models
---

# GroqCloud models
POST *https://api.turing.sh/text/groq*

## Parameters


- **messages**
- Type: array
- Required: true

- **model**
- Type: string
- Required: false
- Options: mixtral-8x7b-32768
- Default: mixtral-8x7b-32768

- **max_tokens**
- Type: number
- Required: false
- Default: 512

- **temperature**
- Type: number
- Required: false
- Default: 0.9

- **id**
- Type: string
- Required: false
- Description: ID of the conversation (used for data saving)
- Default: 7ab7480c-8e5d-4177-89a1-f90444798ae5

## Response


- **result**
- Type: string

- **done**
- Type: boolean

- **cost**
- Type: number

- **finishReason**
- Type: string

- **id**
- Type: string
- Description: ID of the conversation (used for data saving)

## Examples

<CodeGroup title="GroqCloud models example">
```typescript
import axios from "axios";
(async () => {
let response = await axios({
method: "post",
url: 'https://api.turing.sh/text/groq',
headers: {
"Content-Type": "application/json",
Authorization: "Bearer YOUR_API_KEY",
"x-captcha-token": "Captcha key"
},
data: {
"messages": "array",
"model": "mixtral-8x7b-32768",
"max_tokens": 512,
"temperature": 0.9,
"id": "7ab7480c-8e5d-4177-89a1-f90444798ae5"
},
})
})();
```
```python
import requests
import json
response = requests.post(
"https://api.turing.sh/text/groq",
headers={
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_KEY",
"x-captcha-token": "Captcha key"
},
data=json.dumps({
"messages": "array",
"model": "mixtral-8x7b-32768",
"max_tokens": 512,
"temperature": 0.9,
"id": "7ab7480c-8e5d-4177-89a1-f90444798ae5"
}),
)
```
</CodeGroup>
6 changes: 3 additions & 3 deletions docs/text/openchat/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ POST *https://api.turing.sh/text/openchat*
- Type: string
- Required: false
- Description: ID of the conversation (used for data saving)
- Default: 55922e55-e0bf-44c8-8688-ac7173d55694
- Default: a582c198-c87a-4180-bfc1-4b316bd21fb0

- **autoSystemMessage**
- Type: boolean
Expand Down Expand Up @@ -78,7 +78,7 @@ POST *https://api.turing.sh/text/openchat*
"model": "openchat_v3.2_mistral",
"max_tokens": 512,
"temperature": 0.9,
"id": "55922e55-e0bf-44c8-8688-ac7173d55694",
"id": "a582c198-c87a-4180-bfc1-4b316bd21fb0",
"autoSystemMessage": true
},
})
Expand All @@ -99,7 +99,7 @@ POST *https://api.turing.sh/text/openchat*
"model": "openchat_v3.2_mistral",
"max_tokens": 512,
"temperature": 0.9,
"id": "55922e55-e0bf-44c8-8688-ac7173d55694",
"id": "a582c198-c87a-4180-bfc1-4b316bd21fb0",
"autoSystemMessage": true
}),
)
Expand Down
6 changes: 3 additions & 3 deletions docs/text/pawan/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ POST *https://api.turing.sh/text/pawan*
- Type: string
- Required: false
- Description: ID of the conversation (used for data saving)
- Default: 7a9e8f8e-b8ab-4349-aa60-45f7f4c910bc
- Default: 9bed6ed8-6040-4cd1-84a3-68a414d7a731

- **autoSystemMessage**
- Type: boolean
Expand Down Expand Up @@ -78,7 +78,7 @@ POST *https://api.turing.sh/text/pawan*
"model": "zephyr-7b-beta",
"max_tokens": 512,
"temperature": 0.9,
"id": "7a9e8f8e-b8ab-4349-aa60-45f7f4c910bc",
"id": "9bed6ed8-6040-4cd1-84a3-68a414d7a731",
"autoSystemMessage": true
},
})
Expand All @@ -99,7 +99,7 @@ POST *https://api.turing.sh/text/pawan*
"model": "zephyr-7b-beta",
"max_tokens": 512,
"temperature": 0.9,
"id": "7a9e8f8e-b8ab-4349-aa60-45f7f4c910bc",
"id": "9bed6ed8-6040-4cd1-84a3-68a414d7a731",
"autoSystemMessage": true
}),
)
Expand Down
38 changes: 38 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
"google-auth-library": "^8.9.0",
"google-tts-api": "^2.0.2",
"googlethis": "^1.7.1",
"groq-sdk": "^0.3.1",
"hcaptcha": "^0.1.1",
"helmet": "^7.0.0",
"jsonwebtoken": "^9.0.2",
Expand Down
Loading

0 comments on commit 6bac4ce

Please sign in to comment.