Compare commits

..

6 commits

Author SHA1 Message Date
nsde d3aa6ea803
Merge pull request #5 from James-Discord/patch-1
Changing from nova oss python library to just openai
2023-10-10 19:55:14 +02:00
nsde af8bdc8d48
Merge pull request #6 from James-Discord/patch-2
its nova not nova ai
2023-10-10 19:54:51 +02:00
nsde 499fb44df0
Merge pull request #7 from James-Discord/patch-3
Updating text part 3, lmao
2023-10-10 19:54:34 +02:00
James d2e55ffc55
Updating text part 3, lmao 2023-10-08 17:45:24 +01:00
James b6fa402eed
its nova not nova ai 2023-10-08 17:43:22 +01:00
James 396603a7b0
Changing from nova oss python library to just openai 2023-10-08 17:38:40 +01:00
3 changed files with 17 additions and 10 deletions

View file

@ -40,7 +40,7 @@ async def chat(interaction: nextcord.Interaction,
):
await chatbot.respond(interaction, prompt)
@bot.slash_command(description='Sets your DMs up, so you can write the bot.')
@bot.slash_command(description='Sets your DMs up, so you can message to the bot.')
async def dm_setup(interaction: nextcord.Interaction):
try:
await interaction.user.create_dm()

View file

@ -23,7 +23,7 @@ async def send(
color=color
)
embed.set_footer(text='Powered by NovaAI with ❤️', icon_url='https://i.ibb.co/LDyFcSh/fav-blurple.png')
embed.set_footer(text='Powered by Nova with ❤️', icon_url='https://i.ibb.co/LDyFcSh/fav-blurple.png')
embed.set_author(name='NovaCord', url='https://nova-oss.com/novacord')
interaction_type = Union[nextcord.Interaction, nextcord.InteractionResponse]

View file

@ -62,22 +62,29 @@ Don't have `pip` installed? Learn more here: https://pip.pypa.io/en/stable/insta
"""
if how_can_i == 'use the Python library':
text = """To use the official `nova_python` Python library, you just need to do the following.
text = """To use the official `openai` Python library, you just need to do the following.
```py
from nova_python import Models, Endpoints, NovaClient
# Import the OpenAI library (assuming it's already installed)
import openai
client = NovaClient('YOUR_API_KEY')
# Set the OpenAI API key
openai.api_key = "NOVA_AI_KEY"
reponse = client.make_request(
endpoint = Endpoints.CHAT_COMPLETION,
model = Models.GPT3,
data=[
# Set the OpenAI API base URL
openai.api_base = "https://api.nova-oss.com/v1/"
# Create a chat completion using the gpt-3.5-turbo model and the user and system messages
completion = openai.ChatCompletion.create(
model="gpt-3.5-turbo",
messages=[
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "What is the highest mountain?"}
]
)
print(reponse.get_message_content())
# Extract and print the content of the model's response
response_content = completion.choices[0].message.content
print(response_content)
```
"""