msy127 commited on
Commit
5b01ac1
·
1 Parent(s): 40a417d

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -23,6 +23,9 @@ from typing import Any, Optional, Dict, List
23
  from huggingface_hub import InferenceClient
24
  from langchain.llms.base import LLM
25
 
 
 
 
26
  class CustomInferenceClient(LLM, KwArgsModel):
27
  model_name: str
28
  inference_client: InferenceClient
 
23
  from huggingface_hub import InferenceClient
24
  from langchain.llms.base import LLM
25
 
26
+ class KwArgsModel(BaseModel):
27
+ kwargs: Dict[str, Any] = Field(default_factory=dict)
28
+
29
  class CustomInferenceClient(LLM, KwArgsModel):
30
  model_name: str
31
  inference_client: InferenceClient