Spaces:
Runtime error
Runtime error
Rohan Kataria
commited on
Commit
·
df7da5b
1
Parent(s):
f3405cb
changes
Browse files- src/main.py +4 -9
src/main.py
CHANGED
@@ -62,21 +62,16 @@ def ingest_chunks(chunks):
|
|
62 |
#Retreival function to get the data from the database and reply to the user
|
63 |
def retreival(vector_store):
|
64 |
# Selecting the right model
|
65 |
-
|
66 |
-
if current_date < datetime.date(2023, 9, 2):
|
67 |
-
llm_name = "gpt-3.5-turbo-0301"
|
68 |
-
else:
|
69 |
-
llm_name = "gpt-3.5-turbo"
|
70 |
|
71 |
#Creating LLM
|
72 |
-
llm = ChatOpenAI(model=llm_name, temperature=0)
|
73 |
|
74 |
# Creating Prompt template
|
75 |
template = """
|
76 |
-
You're a
|
77 |
If you don't know the answer, just say that you don't know. Don't try to make up an answer.
|
78 |
-
|
79 |
-
|
80 |
QUESTION: {question}
|
81 |
=========
|
82 |
CONTEXT: {context}
|
|
|
62 |
#Retreival function to get the data from the database and reply to the user
|
63 |
def retreival(vector_store):
|
64 |
# Selecting the right model
|
65 |
+
llm_name = "gpt-3.5-turbo"
|
|
|
|
|
|
|
|
|
66 |
|
67 |
#Creating LLM
|
68 |
+
llm = ChatOpenAI(model=llm_name, temperature=0.7)
|
69 |
|
70 |
# Creating Prompt template
|
71 |
template = """
|
72 |
+
You're a Git Code summarisation assistant who searches through "SOURCE DOCUMENTS" and provides helpful sumamries with "CODE SNIPPETS". Given the following extracted parts of a long document and a question, create a final answer with "CODE SNIPPETS" from "SOURCE DOCUMENTS".
|
73 |
If you don't know the answer, just say that you don't know. Don't try to make up an answer.
|
74 |
+
=========
|
|
|
75 |
QUESTION: {question}
|
76 |
=========
|
77 |
CONTEXT: {context}
|