Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -13,17 +13,7 @@ Settings.embed_model = OpenAIEmbedding(model="text-embedding-ada-002")
|
|
13 |
|
14 |
from opensearchpy import OpenSearch, RequestsHttpConnection
|
15 |
|
16 |
-
auth = ('admin','klbvrR4AlGNMaQ')
|
17 |
|
18 |
-
host = '10.11.10.111'
|
19 |
-
port = 32000
|
20 |
-
|
21 |
-
client = OpenSearch(
|
22 |
-
hosts = [{'host': host, 'port': port}],
|
23 |
-
http_auth = auth,
|
24 |
-
use_ssl = True,
|
25 |
-
verify_certs = False
|
26 |
-
)
|
27 |
|
28 |
def generate_opensearch_query(user_input):
|
29 |
prompt = f"""
|
|
|
13 |
|
14 |
from opensearchpy import OpenSearch, RequestsHttpConnection
|
15 |
|
|
|
16 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
|
18 |
def generate_opensearch_query(user_input):
|
19 |
prompt = f"""
|