feat: Add LanceDB support for similar_issue tool and refactor SOC2 compliance feature name

This commit is contained in:
mrT23
2024-01-24 19:40:58 +02:00
parent 9986f5307c
commit f4037e0dfa
4 changed files with 7 additions and 4 deletions

View File

@ -95,7 +95,7 @@ The `review` tool can auto-generate two specific types of labels for a PR:
The `review` tool provides a collection of possible feedbacks about a PR.
It is recommended to review the [possible options](https://github.com/Codium-ai/pr-agent/blob/main/docs/REVIEW.md#enabledisable-features), and choose the ones relevant for your use case.
Some of the feature that are disabled by default are quite useful, and should be considered for enabling. For example:
`require_score_review`, `require_soc2_review`, `enable_review_labels_effort`, and more.
`require_score_review`, `require_soc2_ticket`, `enable_review_labels_effort`, and more.
"""
output += "\n\n</details></td></tr>\n\n"

View File

@ -5,7 +5,6 @@ from typing import List
import openai
import pandas as pd
import pinecone
import lancedb
from pinecone_datasets import Dataset, DatasetMetadata
from pydantic import BaseModel, Field
@ -108,6 +107,7 @@ class PRSimilarIssue:
get_logger().info('No new issues to update')
elif get_settings().pr_similar_issue.vectordb == "lancedb":
import lancedb # import lancedb only if needed
self.db = lancedb.connect(get_settings().lancedb.uri)
self.table = None