Skip to content

Commit

Permalink
Adding client version to report.json file (#465)
Browse files Browse the repository at this point in the history
Adding client version for loader and retriever apps

---------

Co-authored-by: dristy.cd <dristy@clouddefense.io>
  • Loading branch information
dristysrivastava and dristy.cd authored Aug 8, 2024
1 parent 58d747a commit 109edcc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pebblo/app/models/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ class ReportModel(BaseModel):
dataSources: Optional[List[DataSource]]
pebbloServerVersion: Optional[str]
pebbloClientVersion: Optional[str]
clientVersion: Optional[dict]


class LoaderAppListDetails(BaseModel):
Expand Down Expand Up @@ -241,6 +242,7 @@ class RetrievalAppDetails(BaseModel):
instanceDetails: Optional[InstanceDetails]
pebbloServerVersion: Optional[str]
pebbloClientVersion: Optional[str]
clientVersion: Optional[dict]
total_prompt_with_findings: int = 0
retrievals: list[RetrievalData] = []
activeUsers: dict = {}
Expand Down
1 change: 1 addition & 0 deletions pebblo/app/service/doc_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,7 @@ def _generate_final_report(self, raw_data):
dataSources=data_source_obj_list,
pebbloServerVersion=get_pebblo_server_version(),
pebbloClientVersion=self.app_details.get("pluginVersion", ""),
clientVersion=self.app_details.get("clientVersion", {}),
)
return report_dict.dict()

Expand Down
1 change: 1 addition & 0 deletions pebblo/app/service/local_ui_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,7 @@ def get_retrieval_app_details(self, app_content):
instanceDetails=app_content.get("instanceDetails"),
pebbloServerVersion=app_content.get("pebbloServerVersion"),
pebbloClientVersion=app_content.get("pebbloClientVersion"),
clientVersion=app_content.get("clientVersion"),
total_prompt_with_findings=prompt_with_findings,
retrievals=retrieval_data,
activeUsers=active_users,
Expand Down

0 comments on commit 109edcc

Please sign in to comment.