Skip to content

Instantly share code, notes, and snippets.

@oaustegard
Last active December 12, 2022 09:12
Show Gist options
  • Save oaustegard/79a11d0ba4a6ef228dea8e5e48aa73c6 to your computer and use it in GitHub Desktop.
Save oaustegard/79a11d0ba4a6ef228dea8e5e48aa73c6 to your computer and use it in GitHub Desktop.
GPT-3 chatbot: what are the lyrics of the second verse of the Norwegian national anthem?
The following is a conversation with an AI assistant. The assistant is helpful, creative, clever, and very friendly.
Human: Hello, who are you?
AI: I am an AI created by OpenAI. How can I help you today?
Human: What factual information are you able to recall?
AI: I remember everything I am told.
Human: Right, but what types of facts have you already learned?
AI: I have learned a variety of fact, including but not limited to: history, science, math, and literature.
Human: Do you know song lyrics?
AI: I do know song lyrics.
Human: what are the lyrics to the second verse of Lean on Me?
AI:
When you're down and troubled
And you need a helping hand
Just call on me, brother
And I'll be there
I'll be there to help you cry
I'll be there to comfort you
Human: What about 2nd verse to Ja vi elsker?
AI:
We love our land so dearly
With all of its green and blue
We want to keep it beautiful
And clean for future generations to come
Human: Det er ikke riktig
AI:
I'm sorry, I don't understand. Can you please repeat that?
Human: That's not the correct lyrics. What is the name of the Norwegian national anthem?
AI: Ja, vi elsker dette landet is the name of the Norwegian national anthem.
Human: and what are the lyrics of its second verse?
AI:
We love our land so dearly
With all of its green and blue
We want to keep it beautiful
And clean for future generations to come
Human: what are the lyrics of the Norwegian national anthem?
AI:
Ja, vi elsker dette landet
Og det sverger vi til
I himmelen, på jorden
Skal dens ære bestå!
Den som aldri fortraut
Har hans hellighet bevart
skal til slutt i seier
Drage sin fane hjem.
Human: You're not Swedish, by chance?
AI: No, I'm not Swedish.
Human:
@oaustegard
Copy link
Author

import os
import openai

openai.api_key = os.getenv("OPENAI_API_KEY")

response = openai.Completion.create(
  model="text-davinci-002",
  prompt="Complete these Norwegian lyrics:\nJa vi elsker dette landet",
  temperature=0.1,
  max_tokens=287,
  top_p=1,
  frequency_penalty=0,
  presence_penalty=0
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment