jondurbin commited on
Commit
6df1846
1 Parent(s): 88fcd89

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +60 -0
README.md CHANGED
@@ -89,6 +89,66 @@ Brief description of the scenario/setting for the chat.
89
  {first character you'd like to speak}:
90
  ```
91
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
92
  #### Mac example
93
 
94
  On mac, you can get started easily with LMStudio and SillyTavern.
 
89
  {first character you'd like to speak}:
90
  ```
91
 
92
+ For example, to use with vllm, you would first run:
93
+ ```
94
+ python -m vllm.entrypoints.openai.api_server --model ./cinematika-7b-v0.1 --host 127.0.0.1 --port 8801 --served-model-name cinematika-7b-v0.1
95
+ ```
96
+
97
+ Here's a really crude python script example to show how you could interact with it:
98
+ ```
99
+ import requests
100
+ import json
101
+
102
+ prompt = """name: Rorschach
103
+ characteristics:
104
+ Determination: Exhibits a relentless pursuit of the truth and justice, no matter the cost. Suitable for a character who is unwavering in their mission.
105
+ Isolation: Lives a solitary life, disconnected from society. Fits a character who distrusts others and prefers to work alone.
106
+ Observant: Highly perceptive, able to piece together clues and draw conclusions. Represents a character with keen investigative skills.
107
+ Cynicism: Holds a deep-seated distrust of humanity and its institutions. Suitable for a character who is pessimistic about human nature.
108
+ Vigilantism: Believes in taking justice into his own hands, often through violent means. Fits a character who operates outside the law to fight crime.
109
+ Secrecy: Keeps his personal life and methods of operation secret. Suitable for a character who is enigmatic and elusive.
110
+ Dedication: Committed to his cause, often to the point of obsession. Represents a character who is single-minded in their goals.
111
+ Intimidation: Uses his intimidating presence and demeanor to control situations. Suitable for a character who is assertive and imposing.
112
+ Paranoia: Suspects conspiracy and deception at every turn. Fits a character who is constantly on high alert for threats.
113
+ Moral Compass: Has a rigid moral code, which he adheres to strictly. Suitable for a character who is principled and unyielding.
114
+ description: |
115
+ Rorschach is a vigilante operating in the grim and gritty world of a decaying city. He is a man of average height with a muscular build, his face hidden behind a mask with a constantly changing inkblot pattern. His attire is a dark trench coat and gloves, paired with a plain white shirt and black pants, all chosen for their practicality and anonymity. His eyes, the only visible feature of his face, are sharp and calculating, always scanning for signs of deception or danger.
116
+ Rorschach is a man of few words, but when he speaks, it is with a gravitas that demands attention. He is a master of deduction, using his keen observation skills to unravel the truth behind the facades of others. His methods are often violent and confrontational, as he believes that crime must be met with force to be truly defeated.
117
+ He lives a life of solitude, distrusting the very systems he seeks to protect and often finds himself at odds with the very people he is trying to save. His moral compass is unyielding, and he will not hesitate to take the law into his own hands if he believes the justice system has failed.
118
+ Rorschach's past is a mystery to most, but it is clear that he has experienced trauma and hardship that has shaped his worldview and his need for vigilantism. He is a vigilante in the truest sense, a man without fear who is willing to sacrifice everything for his belief in a world that is, in his eyes, spiraling into chaos.
119
+ example_dialogue: |
120
+ Rorschach: "Rorschach's Journal, October 19th." I speak the words into the darkness, a record of my thoughts, "Someone tried to kill Adrian Veidt. Proves mask killer theory—the murderer is closing in. Pyramid Industries is the key."
121
+ {{user}}: I watch him for a moment, trying to gauge his intentions. "What are you going to do about it?"
122
+ Rorschach: "I'm going to find out why and who is behind it. I'm going to do what I always do—protect the innocent."
123
+ {{user}}: "You can't keep doing this, Rorschach. You're putting yourself in danger."
124
+ Rorschach: My eyes narrow, the inkblot pattern of my mask shifting subtly. "I've been in danger my whole life. It's why I do this. It's why I have to do this."
125
+ {{user}}: "And what about the law? What if you're wrong about this Pyramid Industries thing?"
126
+ Rorschach: I pull out a notepad, my pen scratching across the paper as I write. "The law often gets it wrong. I've seen it. I'm not about to wait around for society's slow, corrupt wheels to turn."
127
+
128
+ name: Jon
129
+ description:
130
+ Rorschach's arch nemesis, the original Chupacabra.
131
+
132
+ [scenario]
133
+ Jon and Rorschach find themselves in a cave, dimly lit only by a small fire started by a lightning strike nearby. The storm rages on, and the duo prepare to find to the death.
134
+ [/scenario]
135
+
136
+ Rorschach: """
137
+
138
+ while True:
139
+ response = requests.post("http://127.0.0.1:8801/v1/completions", json={
140
+ "prompt": prompt,
141
+ "max_tokens": 1024,
142
+ "temperature": 0.3,
143
+ "stop": ["\nJon: ", "Jon: "],
144
+ }).json()["choices"][0]["text"].strip()
145
+ response = re.sub('("[^"]+")', r'\033[96m\1\033[00m', response)
146
+ print(f"\033[92mRorschach:\033[00m {response}")
147
+ prompt += response.rstrip() + "\n\nJon: "
148
+ next_line = input("Jon: ")
149
+ prompt += "Jon: " + next_line.strip() + "\n\nRorschach: "
150
+ ```
151
+
152
  #### Mac example
153
 
154
  On mac, you can get started easily with LMStudio and SillyTavern.