Spaces:
Running
Running
Updated space
Browse files- index.html +13 -12
- requirements.txt +1 -2
index.html
CHANGED
@@ -10,7 +10,7 @@
|
|
10 |
<meta property="og:title" content="Quardo's OpenAI proxy">
|
11 |
<meta property="og:description" content="Documentation for Quardo's OpenAI proxy">
|
12 |
<meta property="og:type" content="website">
|
13 |
-
<meta property="og:url" content="https://
|
14 |
<meta property="og:image" content="https://tenor.com/view/cat-cat-e-cat-meme-cat-face-gif-23642589">
|
15 |
<meta name="twitter:card" content="summary_large_image">
|
16 |
<meta name="twitter:title" content="Quardo's OpenAI proxy">
|
@@ -38,13 +38,14 @@
|
|
38 |
<h2>Updates</h2>
|
39 |
<div>
|
40 |
<div>
|
41 |
-
<
|
42 |
-
|
43 |
-
<
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
|
|
48 |
<strong> - 7. Update.</strong>
|
49 |
<p> * Added a second faketool: math. Now the model can perform calculations.</p>
|
50 |
</div><hr/>
|
@@ -106,7 +107,7 @@ from openai import OpenAI
|
|
106 |
|
107 |
client = OpenAI(
|
108 |
# Or use the `OPENAI_BASE_URL` env var
|
109 |
-
base_url="https://
|
110 |
|
111 |
# No key is needed cause this is a proxy
|
112 |
api_key="none"
|
@@ -128,7 +129,7 @@ print(completion.choices[0].message.content)</textarea>
|
|
128 |
import openai
|
129 |
|
130 |
openai.api_key = 'none'
|
131 |
-
openai.base_url = "https://
|
132 |
|
133 |
completion = openai.chat.completions.create( # or openai.ChatCompletion.create (idk)
|
134 |
model="gpt-4o-mini",
|
@@ -148,9 +149,9 @@ print(completion.choices[0].message.content)</textarea>
|
|
148 |
<hr/>
|
149 |
<div>
|
150 |
<h3>Actual endpoints:</h3>
|
151 |
-
<p><strong>1. [GET]</strong> <a href="https://
|
152 |
<label>Simply shows you the available models</label>
|
153 |
-
<p><strong>3. [POST]</strong> <a href="https://
|
154 |
<label>Generates a chat completion based on the provided messages and model</label>
|
155 |
</div>
|
156 |
</div>
|
|
|
10 |
<meta property="og:title" content="Quardo's OpenAI proxy">
|
11 |
<meta property="og:description" content="Documentation for Quardo's OpenAI proxy">
|
12 |
<meta property="og:type" content="website">
|
13 |
+
<meta property="og:url" content="https://chat.cwrd.one/api/v1/docs">
|
14 |
<meta property="og:image" content="https://tenor.com/view/cat-cat-e-cat-meme-cat-face-gif-23642589">
|
15 |
<meta name="twitter:card" content="summary_large_image">
|
16 |
<meta name="twitter:title" content="Quardo's OpenAI proxy">
|
|
|
38 |
<h2>Updates</h2>
|
39 |
<div>
|
40 |
<div>
|
41 |
+
<div>
|
42 |
+
<strong> - 8. Update.</strong>
|
43 |
+
<p> * Got new hosting for this space; <a href="https://chat.cow.rip/">chat.cow.rip</a></p>
|
44 |
+
<label>- The new hosting is provided by: repl.it.</label>
|
45 |
+
<label>- The updates to the space will first be released there,</label>
|
46 |
+
<label>- then later, they will come to the Hugging Face space, mostly due to the fact that repl.it is capable of faster build speeds.</label>
|
47 |
+
<label>- So in simple terms, <a href="https://chat.cow.rip/">chat.cow.rip</a> will be like a beta release for this space, and that's it.</label>
|
48 |
+
</div><hr/>
|
49 |
<strong> - 7. Update.</strong>
|
50 |
<p> * Added a second faketool: math. Now the model can perform calculations.</p>
|
51 |
</div><hr/>
|
|
|
107 |
|
108 |
client = OpenAI(
|
109 |
# Or use the `OPENAI_BASE_URL` env var
|
110 |
+
base_url="https://chat.cwrd.one/api/v1",
|
111 |
|
112 |
# No key is needed cause this is a proxy
|
113 |
api_key="none"
|
|
|
129 |
import openai
|
130 |
|
131 |
openai.api_key = 'none'
|
132 |
+
openai.base_url = "https://chat.cwrd.one/api/v1"
|
133 |
|
134 |
completion = openai.chat.completions.create( # or openai.ChatCompletion.create (idk)
|
135 |
model="gpt-4o-mini",
|
|
|
149 |
<hr/>
|
150 |
<div>
|
151 |
<h3>Actual endpoints:</h3>
|
152 |
+
<p><strong>1. [GET]</strong> <a href="https://chat.cwrd.one/api/v1/models">/api/v1/models</a></p>
|
153 |
<label>Simply shows you the available models</label>
|
154 |
+
<p><strong>3. [POST]</strong> <a href="https://chat.cwrd.one/api/v1/chat/completions">/api/v1/chat/completions</a></p>
|
155 |
<label>Generates a chat completion based on the provided messages and model</label>
|
156 |
</div>
|
157 |
</div>
|
requirements.txt
CHANGED
@@ -2,5 +2,4 @@ uvicorn==0.27.1
|
|
2 |
starlette==0.37.2
|
3 |
sse-starlette==2.1.2
|
4 |
requests==2.31.0
|
5 |
-
aiohttp==3.8.5
|
6 |
-
asyncio
|
|
|
2 |
starlette==0.37.2
|
3 |
sse-starlette==2.1.2
|
4 |
requests==2.31.0
|
5 |
+
aiohttp==3.8.5
|
|