Update TextGen/router.py
Browse files- TextGen/router.py +14 -1
TextGen/router.py
CHANGED
@@ -88,6 +88,11 @@ class Generate(BaseModel):
|
|
88 |
text:str
|
89 |
|
90 |
class Invoke(BaseModel):
|
|
|
|
|
|
|
|
|
|
|
91 |
system_prompt:str
|
92 |
message:str
|
93 |
|
@@ -158,9 +163,17 @@ def api_home():
|
|
158 |
def inference(message: Message):
|
159 |
return generate_text(messages=message.messages, npc=message.npc)
|
160 |
|
161 |
-
@app.post("/invoke_model"
|
162 |
def story(prompt: Invoke):
|
163 |
return inference_model(system_messsage=prompt.system_prompt,prompt=prompt.message)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
164 |
|
165 |
#Dummy function for now
|
166 |
def determine_vocie_from_npc(npc,genre):
|
|
|
88 |
text:str
|
89 |
|
90 |
class Invoke(BaseModel):
|
91 |
+
rooms:List
|
92 |
+
room_of_interest:List
|
93 |
+
index_exit:int
|
94 |
+
|
95 |
+
class Rooms(BaseModel):
|
96 |
system_prompt:str
|
97 |
message:str
|
98 |
|
|
|
163 |
def inference(message: Message):
|
164 |
return generate_text(messages=message.messages, npc=message.npc)
|
165 |
|
166 |
+
@app.post("/invoke_model")
|
167 |
def story(prompt: Invoke):
|
168 |
return inference_model(system_messsage=prompt.system_prompt,prompt=prompt.message)
|
169 |
+
|
170 |
+
@app.post("/generate_level")
|
171 |
+
def placement(input: Room):
|
172 |
+
print(input)
|
173 |
+
answer={
|
174 |
+
"key":"value"
|
175 |
+
}
|
176 |
+
return answer
|
177 |
|
178 |
#Dummy function for now
|
179 |
def determine_vocie_from_npc(npc,genre):
|