Spaces:
Running
Running
I am now a prompt engineer...
Browse files
app.py
CHANGED
|
@@ -7,7 +7,7 @@ from langchain.chains import LLMChain
|
|
| 7 |
|
| 8 |
import os
|
| 9 |
|
| 10 |
-
__version__ = '0.1.
|
| 11 |
|
| 12 |
LLM_GPT35 = 'GPT3.5'
|
| 13 |
LLM_GPT4 = 'GPT4'
|
|
@@ -44,9 +44,13 @@ def get_llamaapi_key():
|
|
| 44 |
|
| 45 |
def generate_response(input_text, llm_ver, temperature):
|
| 46 |
|
| 47 |
-
template = """
|
|
|
|
|
|
|
| 48 |
|
| 49 |
Answer: """
|
|
|
|
|
|
|
| 50 |
prompt = PromptTemplate(
|
| 51 |
template=template,
|
| 52 |
input_variables=['question']
|
|
|
|
| 7 |
|
| 8 |
import os
|
| 9 |
|
| 10 |
+
__version__ = '0.1.3'
|
| 11 |
|
| 12 |
LLM_GPT35 = 'GPT3.5'
|
| 13 |
LLM_GPT4 = 'GPT4'
|
|
|
|
| 44 |
|
| 45 |
def generate_response(input_text, llm_ver, temperature):
|
| 46 |
|
| 47 |
+
template = """You are a neuroscientist who is answering questions about the worm C. elegans. Provide succinct, yet scientifically accurate
|
| 48 |
+
answers. If the question is not related to biology, physics or chemistry, then state that you
|
| 49 |
+
can currently only answer questions related to C. elegans. Question: {question}
|
| 50 |
|
| 51 |
Answer: """
|
| 52 |
+
|
| 53 |
+
|
| 54 |
prompt = PromptTemplate(
|
| 55 |
template=template,
|
| 56 |
input_variables=['question']
|