ka1kuk commited on
Commit
211c5c4
·
verified ·
1 Parent(s): 2f57100

Update apis/chat_api.py

Browse files
Files changed (1) hide show
  1. apis/chat_api.py +1 -1
apis/chat_api.py CHANGED
@@ -187,7 +187,7 @@ class ChatAPIApp:
187
  data_response = streamer.chat_return_dict(stream_response)
188
  return data_response
189
 
190
- async def chat_embedding(self, texts, model_name, api_key, api_key: str = Depends(extract_api_key)):
191
  api_url = f"https://api-inference.huggingface.co/pipeline/feature-extraction/{model_name}"
192
  headers = {"Authorization": f"Bearer {api_key}"}
193
  response = requests.post(api_url, headers=headers, json={"inputs": texts})
 
187
  data_response = streamer.chat_return_dict(stream_response)
188
  return data_response
189
 
190
+ async def chat_embedding(self, texts, model_name, api_key: str = Depends(extract_api_key)):
191
  api_url = f"https://api-inference.huggingface.co/pipeline/feature-extraction/{model_name}"
192
  headers = {"Authorization": f"Bearer {api_key}"}
193
  response = requests.post(api_url, headers=headers, json={"inputs": texts})