Kshitijk20 commited on
Commit
08cfd0c
·
1 Parent(s): 291a674
app/schemas/metadata_schema.py CHANGED
@@ -9,14 +9,14 @@ class CommonMetaData(BaseModel):
9
  jurisdiction: Optional[List[str]] = Field(
10
  default=None, description="Applicable jurisdictions/regions/countries"
11
  )
12
- effective_date: Optional[List[str]] = Field(None, description="Date from which the document is effective")
13
- expiry_date: Optional[List[str]] = Field(None, description="Date until which the document is valid")
14
  parties: Optional[List[str]] = Field(None, description="Involved parties (e.g., employer/employee, insurer/insured)")
15
  # obligations: Optional[List[str]] = Field(
16
  # default=None,
17
  # description="List of short, normalized obligation keywords (2–5 words each, no full sentences)"
18
  # )
19
- penalties: Optional[List[str]] = Field(None, description="Penalties/non-compliance consequences")
20
  # notes: Optional[List[str]] = Field(None, description="Freeform additional metadata")
21
  # added_new_keyword: bool = False
22
  added_new_keyword: bool = True
@@ -29,9 +29,9 @@ class InsuranceMetadata(CommonMetaData):
29
  description="Type(s) of coverage. Short keywords (1–3 words each)."
30
  )
31
  # premium_amount: Optional[List[str]] = None
32
- exclusions: Optional[List[str]] = Field(
33
- description="List of normalized keywords representing exclusions (short, 2-5 words each, not full paragraphs).", default=None
34
- )
35
 
36
 
37
  class HRMetadata(CommonMetaData):
 
9
  jurisdiction: Optional[List[str]] = Field(
10
  default=None, description="Applicable jurisdictions/regions/countries"
11
  )
12
+ # effective_date: Optional[List[str]] = Field(None, description="Date from which the document is effective")
13
+ # expiry_date: Optional[List[str]] = Field(None, description="Date until which the document is valid")
14
  parties: Optional[List[str]] = Field(None, description="Involved parties (e.g., employer/employee, insurer/insured)")
15
  # obligations: Optional[List[str]] = Field(
16
  # default=None,
17
  # description="List of short, normalized obligation keywords (2–5 words each, no full sentences)"
18
  # )
19
+ # penalties: Optional[List[str]] = Field(None, description="Penalties/non-compliance consequences")
20
  # notes: Optional[List[str]] = Field(None, description="Freeform additional metadata")
21
  # added_new_keyword: bool = False
22
  added_new_keyword: bool = True
 
29
  description="Type(s) of coverage. Short keywords (1–3 words each)."
30
  )
31
  # premium_amount: Optional[List[str]] = None
32
+ # exclusions: Optional[List[str]] = Field(
33
+ # description="List of normalized keywords representing exclusions (short, 2-5 words each, not full paragraphs).", default=None
34
+ # )
35
 
36
 
37
  class HRMetadata(CommonMetaData):
app/utils/model_loader.py CHANGED
@@ -67,7 +67,7 @@ class ModelLoader(BaseModel):
67
  api_key = os.getenv("OPENAI_API_KEY")
68
  model_name = self.config["embedding_model"]["openai"]["model_name"]
69
  llm = OpenAIEmbeddings(model=model_name, api_key = api_key)
70
- elif self.model_provider == "operouter":
71
  load_dotenv()
72
  api_key = os.getenv("OPENROUTER_API_KEY")
73
  model_name = self.config["llm"]["openrouter"]["model_name"]
 
67
  api_key = os.getenv("OPENAI_API_KEY")
68
  model_name = self.config["embedding_model"]["openai"]["model_name"]
69
  llm = OpenAIEmbeddings(model=model_name, api_key = api_key)
70
+ elif self.model_provider == "openrouter":
71
  load_dotenv()
72
  api_key = os.getenv("OPENROUTER_API_KEY")
73
  model_name = self.config["llm"]["openrouter"]["model_name"]