Update main.py
Browse files
main.py
CHANGED
@@ -148,9 +148,15 @@ def image_detail(detail_id: int = Path(None, description="The ID of 1.model id a
|
|
148 |
class Test(BaseModel):
|
149 |
prompt: str
|
150 |
model: str = 'gpt-3.5-turbo'
|
151 |
-
neg: str =
|
152 |
|
153 |
@app.post("/test")
|
154 |
def test(request: Test):
|
155 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
156 |
|
|
|
148 |
class Test(BaseModel):
|
149 |
prompt: str
|
150 |
model: str = 'gpt-3.5-turbo'
|
151 |
+
neg: str = True
|
152 |
|
153 |
@app.post("/test")
|
154 |
def test(request: Test):
|
155 |
+
if neg == True:
|
156 |
+
chat = "hello world"
|
157 |
+
elif neg == "True":
|
158 |
+
chat = "Hi there"
|
159 |
+
else:
|
160 |
+
chat = "Hi world"
|
161 |
+
return {'data': f'Prompt is {request.prompt} Model is {request.model} Neg is {request.neg} Chat is {chat}'}
|
162 |
|