Spaces:
Runtime error
Runtime error
updated global
Browse files
app.py
CHANGED
|
@@ -17,30 +17,24 @@ title = """
|
|
| 17 |
</div>
|
| 18 |
"""
|
| 19 |
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
chroma_client = chromadb.Client(
|
| 25 |
-
Settings(
|
| 26 |
-
chroma_db_impl='duckdb+parquet',
|
| 27 |
-
persist_directory='./vectorstore/',
|
| 28 |
-
)
|
| 29 |
)
|
|
|
|
| 30 |
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
)
|
| 35 |
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
)
|
| 44 |
|
| 45 |
|
| 46 |
def respond(query):
|
|
|
|
| 17 |
</div>
|
| 18 |
"""
|
| 19 |
|
| 20 |
+
chroma_client = chromadb.Client(
|
| 21 |
+
Settings(
|
| 22 |
+
chroma_db_impl='duckdb+parquet',
|
| 23 |
+
persist_directory='./vectorstore/',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
)
|
| 25 |
+
)
|
| 26 |
|
| 27 |
+
db = chroma_client.get_collection(
|
| 28 |
+
name='help-360',
|
| 29 |
+
)
|
|
|
|
| 30 |
|
| 31 |
+
embeddings_generator = OpenAIEmbeddings(
|
| 32 |
+
openai_api_key=os.getenv('AZURE_OPENAI_KEY'),
|
| 33 |
+
openai_api_base=os.getenv('AZURE_OPENAI_ENDPOINT'),
|
| 34 |
+
openai_api_type='azure',
|
| 35 |
+
openai_api_version='2023-05-15',
|
| 36 |
+
deployment='embedding-test'
|
| 37 |
+
)
|
|
|
|
| 38 |
|
| 39 |
|
| 40 |
def respond(query):
|