NOVA / app /modules /search /providers /models.py
S-4-G-4-R's picture
Initial commit
20b15f3
Raw
History Blame Contribute Delete
1.07 kB
from typing import List, Literal, Optional
from pydantic import BaseModel, Field
class ResearchPaper(BaseModel):
title: str = Field(description="The title of the paper")
authors: Optional[List[str]] = Field(description="The list of the authors of the paper mentioned.", default=None)
abstract: Optional[str] = Field(description="The abstract or the summary of the mentioned research paper.", default=None)
year: Optional[int] = Field(description="The year in which the paper was published, leave if not mentioned", default=None)
citation_count: Optional[int] = Field(description="The citation count of the paper, leave if not mentioned", default=None)
url: Optional[str] = Field(description="The url of the research given on the source", default=None)
pdf_url: Optional[str] = Field(description="The pdf url of the research paper if mentioned", default=None)
source: Literal["arXiv", "SemanticScholar", "OpenAlex"] = Field(
description="The source from which it was extracted 'arXiv' , 'SemanticScholar' or 'OpenAlex'"
)