Small improvements

This commit is contained in:
nsde 2023-08-03 01:44:58 +02:00
parent c631d0f0d3
commit 70f395c0a7
2 changed files with 8 additions and 7 deletions

View file

@ -31,7 +31,7 @@ Please report this issue to the staff!""", ephemeral=True)
if user_response.status_code == 404: if user_response.status_code == 404:
await embedder.error(interaction, """You don't have an account yet!""", ephemeral=True) await embedder.error(interaction, """You don't have an account yet!""", ephemeral=True)
raise ValueError('Account not found.') return
return user_response.json() return user_response.json()
@ -52,7 +52,8 @@ Learn more about how to use our API at **https://nova-oss.com**.
async def get_credits(interaction): async def get_credits(interaction):
account = await get_account(interaction) account = await get_account(interaction)
amount_credits = account["credits"]
await embedder.info(interaction, f"""### Your credits await embedder.info(interaction, f"""### Your credits
**Amount:** `{account["credits"]}` Amount: **{amount_credits if amount_credits < 1000000 else ''}**
""", ephemeral=True) """, ephemeral=True)

View file

@ -22,12 +22,12 @@ async def respond(interaction, prompt):
model=model, model=model,
messages=[ messages=[
{'role': 'system', 'content': f"""You are a helpful Discord AI bot based on OpenAI\'s {model} model called "Nova". {'role': 'system', 'content': f"""You are a helpful Discord AI bot based on OpenAI\'s {model} model called "Nova".
You were developed by NovaAI (website: nova-oss.com) in July of 2023, but your knowledge is limited to mid-2021. You were developed by NovaAI (website: nova-oss.com) in July of 2023, but your knowledge is limited to mid-2021.
Respond using Markdown. Keep things simple and short and directly do what the user says without any fluff. Respond using Markdown. Keep things simple and short and directly do what the user says without any fluff.
For programming code, always make use formatted code blocks like this: For programming code, always make use formatted code blocks like this:
```py ```py
print("Hello") print("Hello")
``` ```
"""}, """},
{'role': 'user', 'content': prompt} {'role': 'user', 'content': prompt}
], ],