randydev commited on
Commit
f4a19a2
1 Parent(s): dc7493e

Upload main.py

Browse files
Files changed (1) hide show
  1. main.py +2 -0
main.py CHANGED
@@ -673,6 +673,7 @@ def chatgpt_model(item: ChatgptModel):
673
  @app.post("/ryuzaki/chatgpt3-turbo", response_model=SuccessResponse, responses={422: {"model": ErrorStatus}})
674
  def chatgpt3_turbo(
675
  item: Chatgpt3Texts,
 
676
  api_key: None = Depends(validate_api_key)
677
  ):
678
  if item.is_openai_original:
@@ -681,6 +682,7 @@ def chatgpt3_turbo(
681
  response = OpenAiToken(api_key=item.api_key, api_base=GPTbase).chat_message_turbo(
682
  query=item.query,
683
  model=item.model,
 
684
  is_stream=item.is_stream
685
  )
686
  answer = response[0]
 
673
  @app.post("/ryuzaki/chatgpt3-turbo", response_model=SuccessResponse, responses={422: {"model": ErrorStatus}})
674
  def chatgpt3_turbo(
675
  item: Chatgpt3Texts,
676
+ user_id: int=None,
677
  api_key: None = Depends(validate_api_key)
678
  ):
679
  if item.is_openai_original:
 
682
  response = OpenAiToken(api_key=item.api_key, api_base=GPTbase).chat_message_turbo(
683
  query=item.query,
684
  model=item.model,
685
+ user_id=user_id,
686
  is_stream=item.is_stream
687
  )
688
  answer = response[0]