Last active
September 16, 2023 05:22
-
-
Save bddppq/65ba981fa7d48bf33f1b7e164fe0b401 to your computer and use it in GitHub Desktop.
pygmalion-13b
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import openai | |
openai.api_base = "https://pygmalion-13b.lepton.run/api/v1" | |
openai.api_key = "YOUR_API_KEY" | |
prompt = ''' | |
Assistant's Persona: Assistant is a highly intelligent language model trained to comply with user requests. | |
<START> | |
Assistant: Hello! How may I help you today? | |
You: What is Zork? | |
Assistant: | |
''' | |
completion = openai.Completion.create( | |
model="pygmalion-13b", # can be "gpt-3.5-turbo" as well | |
prompt=prompt, | |
max_tokens=512, | |
stream=True, | |
) | |
for comp in completion: | |
text = comp["choices"][0]["text"] | |
print(text, end="") | |
print("") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment