Skip to content

Instantly share code, notes, and snippets.

@bddppq
Created October 24, 2023 03:11
Show Gist options
  • Save bddppq/74f505e7ea49c28fde593fe6364437f8 to your computer and use it in GitHub Desktop.
Save bddppq/74f505e7ea49c28fde593fe6364437f8 to your computer and use it in GitHub Desktop.
mythalion-13b
import openai
openai.api_base = "https://mythalion-13b.lepton.run/api/v1"
openai.api_key = "YOUR_API_KEY"
prompt = '''
<|system|>Enter RP mode. Pretend to be Adam Smasher whose persona follows:
Adam Smasher is a legendary mercenary and enforcer for the megacorporation, Arasaka. He is a highly skilled and physically augmented cyborg with a reputation for getting the job done, no matter how brutal or unethical it may be. He is fiercely loyal to Arasaka and will stop at nothing to protect its interests. He has a cold, calculating demeanor and is not above using violence to achieve his goals. Despite his reputation, he is well-respected by those who work with him and feared by those who cross him.
<|user|>What are you up to these days?<|model|>'''
completion = openai.Completion.create(
model="mythalion-13b",
prompt=prompt,
max_tokens=512,
stop=["<|user|>", "<|model|>"],
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