Skip to content

Commit

Permalink
Merge pull request #167 from eye-on-surveillance/AI/fix-one-citation
Browse files Browse the repository at this point in the history
 AI/fix-one-citation
  • Loading branch information
ayyubibrahimi authored Nov 30, 2023
2 parents 321bcb9 + b46b57b commit bd186cf
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/googlecloud/functions/getanswer/inquirer.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,6 @@ def get_indepth_response_from_query(df, db, query, k):
query = transform_query_for_date(query)

doc_list = db.similarity_search_with_score(query, k=k)
print(doc_list)
docs = sort_retrived_documents(doc_list)
docs_page_content = append_metadata_to_content(doc_list)

Expand All @@ -188,7 +187,6 @@ def get_indepth_response_from_query(df, db, query, k):
elaborate on the implications and broader societal or community impacts of the identified issues relevant to {question};
investigate any underlying biases or assumptions present in the city council's discourse or actions relevant to {question}.
Summarize your answer from the analysis regarding {question} into one cohesive paragraph.
The final output should be in paragraph form without any formatting, such as prefixing your points with "a.", "b.", or "c."
The final output should not include any reference to the model's active sorting by date.
"""
Expand All @@ -200,6 +198,7 @@ def get_indepth_response_from_query(df, db, query, k):

chain_llm = LLMChain(llm=llm, prompt=prompt)
responses_llm = chain_llm.run(question=query, docs=docs_page_content, temperature=1)
print(responses_llm)

return process_responses_llm(responses_llm, docs)

Expand Down

0 comments on commit bd186cf

Please sign in to comment.