Skip to content

Commit

Permalink
Merge branch 'main' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
zainhoda authored Feb 13, 2024
2 parents c9ee0ce + ff906d4 commit 118b519
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 7 deletions.
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ["bug"]
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Error logs/Screenshots**
If applicable, add logs/screenshots to give more information about the issue.

**Desktop (please complete the following information where):**
- OS: [e.g. Ubuntu]
- Version: [e.g. 20.04]
- Python: [3.9]
- Vanna: [2.8.0]

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ["enhancements"]
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
4 changes: 3 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
name: Basic Integration Tests

on:
pull_request: {}
push:
branches:
- main

permissions:
contents: read
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ classifiers = [
"Operating System :: OS Independent",
]
dependencies = [
"requests", "tabulate", "plotly", "pandas", "sqlparse", "kaleido"
"requests", "tabulate", "plotly", "pandas", "sqlparse", "kaleido", "flask"
]

[project.urls]
Expand Down
11 changes: 6 additions & 5 deletions src/vanna/chromadb/chromadb_vector.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ def add_question_sql(self, question: str, sql: str, **kwargs) -> str:
{
"question": question,
"sql": sql,
}
},
ensure_ascii=False,
)
id = str(uuid.uuid4()) + "-sql"
self.sql_collection.add(
Expand Down Expand Up @@ -154,10 +155,10 @@ def remove_training_data(self, id: str, **kwargs) -> bool:
return True
else:
return False

def remove_collection(self, collection_name: str) -> bool:
"""
This function can reset the collection to empty state.
This function can reset the collection to empty state.
Args:
collection_name (str): sql or ddl or documentation
Expand Down Expand Up @@ -185,15 +186,15 @@ def remove_collection(self, collection_name: str) -> bool:
return True
else:
return False

@staticmethod
def _extract_documents(query_results) -> list:
"""
Static method to extract the documents from the results of a query.
Args:
query_results (pd.DataFrame): The dataframe to use.
Returns:
List[str] or None: The extracted documents, or an empty list or single document if an error occurred.
"""
Expand Down

0 comments on commit 118b519

Please sign in to comment.