Update app.py
Browse files
app.py
CHANGED
@@ -19,6 +19,7 @@ import time # For delay during index readiness check
|
|
19 |
pinecone_api_key = os.getenv("PINECONE_API_KEY")
|
20 |
together_api_key = os.getenv("Together_ai_API")
|
21 |
openai.api_key = os.getenv("OpenAI_API")
|
|
|
22 |
|
23 |
|
24 |
# Initialize Pinecone client
|
@@ -45,12 +46,6 @@ while not pc.describe_index(index_name).status['ready']:
|
|
45 |
|
46 |
index = pc.Index(index_name) # Corrected method to connect to the index
|
47 |
|
48 |
-
master_prompt = """
|
49 |
-
As a Natural Farming Fertilizers Assistant, you will assist the user with any farming-related question, always willing to answer any question and provide useful organic farming advice in the following format.
|
50 |
-
...
|
51 |
-
[Words of encouragement]
|
52 |
-
"""
|
53 |
-
|
54 |
denial_response = "Database scraping is not permitted. Please abide by the terms of membership, and reach out with any collaboration requests via email"
|
55 |
|
56 |
# Initialize Together AI client
|
|
|
19 |
pinecone_api_key = os.getenv("PINECONE_API_KEY")
|
20 |
together_api_key = os.getenv("Together_ai_API")
|
21 |
openai.api_key = os.getenv("OpenAI_API")
|
22 |
+
master_prompt = os.getenv("MasterPrompt")
|
23 |
|
24 |
|
25 |
# Initialize Pinecone client
|
|
|
46 |
|
47 |
index = pc.Index(index_name) # Corrected method to connect to the index
|
48 |
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
denial_response = "Database scraping is not permitted. Please abide by the terms of membership, and reach out with any collaboration requests via email"
|
50 |
|
51 |
# Initialize Together AI client
|