ka1kuk commited on
Commit
0c7bb8f
1 Parent(s): f1b6599

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +8 -2
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 = False
152
 
153
  @app.post("/test")
154
  def test(request: Test):
155
- return {'data': f'Prompt is {request.prompt} Model is {request.model} Neg is {request.neg}'}
 
 
 
 
 
 
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