subhrajit mohanty commited on
Commit
af91e11
·
1 Parent(s): 54db0a4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -2
app.py CHANGED
@@ -46,7 +46,6 @@ def verify_token(token: str = Depends(oauth2_scheme)):
46
  class ChatInput(BaseModel):
47
  message: str
48
  openAI_token: str
49
- model_name: str
50
 
51
 
52
  class RefToken(BaseModel):
@@ -97,7 +96,6 @@ async def list(token: str = Depends(verify_token)):
97
  async def chat(chat_input: ChatInput, token: str = Depends(verify_token)):
98
  openai.api_key = chat_input.openAI_token
99
  prompt = f"User: {chat_input.message}\nAI:"
100
- model_name = chat_input.model_name
101
  try:
102
  return StreamingResponse(get_openai_generator(prompt), media_type='text/event-stream')
103
  except Exception as e:
 
46
  class ChatInput(BaseModel):
47
  message: str
48
  openAI_token: str
 
49
 
50
 
51
  class RefToken(BaseModel):
 
96
  async def chat(chat_input: ChatInput, token: str = Depends(verify_token)):
97
  openai.api_key = chat_input.openAI_token
98
  prompt = f"User: {chat_input.message}\nAI:"
 
99
  try:
100
  return StreamingResponse(get_openai_generator(prompt), media_type='text/event-stream')
101
  except Exception as e: