Alvlt's picture
Add vendor and cwe fields to prediction response
631793e
Raw
History Blame Contribute Delete
316 Bytes
from pydantic import BaseModel
# Just the ID is sufficient, as the API itself handles fetching the data from the NVD
class CVERequest(BaseModel):
cve_id: str
class PredictionResponse(BaseModel):
cve_id: str
probability: float
prediction: int
vendor: str | None = None
cwe: str | None = None