From 396603a7b0c28a348a01ad712b81c620b4bb7d4c Mon Sep 17 00:00:00 2001 From: James <85806019+James-Discord@users.noreply.github.com> Date: Sun, 8 Oct 2023 17:38:40 +0100 Subject: [PATCH 1/3] Changing from nova oss python library to just openai --- cord/tutorials.py | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/cord/tutorials.py b/cord/tutorials.py index d16aa99..8d31e00 100755 --- a/cord/tutorials.py +++ b/cord/tutorials.py @@ -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) ``` """ From b6fa402eed8b0e6c9ca6a6639b1115b893fdb1d1 Mon Sep 17 00:00:00 2001 From: James <85806019+James-Discord@users.noreply.github.com> Date: Sun, 8 Oct 2023 17:43:22 +0100 Subject: [PATCH 2/3] its nova not nova ai --- cord/embedder.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cord/embedder.py b/cord/embedder.py index 7d51e1d..504aed6 100755 --- a/cord/embedder.py +++ b/cord/embedder.py @@ -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] From d2e55ffc55dd36d60855268fb80fb3c937be613f Mon Sep 17 00:00:00 2001 From: James <85806019+James-Discord@users.noreply.github.com> Date: Sun, 8 Oct 2023 17:45:24 +0100 Subject: [PATCH 3/3] Updating text part 3, lmao --- cord/bot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cord/bot.py b/cord/bot.py index c9d5172..8689af9 100755 --- a/cord/bot.py +++ b/cord/bot.py @@ -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()