Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -46,7 +46,7 @@ async def ai(ctx, *, input_text: str):
|
|
46 |
"""Ask our AI model a question. (Session resets every 1 message!)"""\
|
47 |
|
48 |
try:
|
49 |
-
client = grc.Client("https://wop-xxx-opengpt.hf.space/"
|
50 |
|
51 |
# Make a request to the /chat endpoint
|
52 |
result = client.predict(
|
@@ -57,6 +57,7 @@ async def ai(ctx, *, input_text: str):
|
|
57 |
1.2, # Repetition penalty value between 1.0 and 2.0
|
58 |
api_name="/chat"
|
59 |
)
|
|
|
60 |
|
61 |
# Create an embed with the AI's response
|
62 |
embed = discord.Embed(title="AI Response", description=result, color=discord.Color.green())
|
|
|
46 |
"""Ask our AI model a question. (Session resets every 1 message!)"""\
|
47 |
|
48 |
try:
|
49 |
+
client = grc.Client("https://wop-xxx-opengpt.hf.space/")
|
50 |
|
51 |
# Make a request to the /chat endpoint
|
52 |
result = client.predict(
|
|
|
57 |
1.2, # Repetition penalty value between 1.0 and 2.0
|
58 |
api_name="/chat"
|
59 |
)
|
60 |
+
result = result[:-4]
|
61 |
|
62 |
# Create an embed with the AI's response
|
63 |
embed = discord.Embed(title="AI Response", description=result, color=discord.Color.green())
|