Skip to content

Commit

Permalink
Merge pull request #36 from FloRul/feature/api-auth
Browse files Browse the repository at this point in the history
Add print statement to display first document in retrieved list
  • Loading branch information
FloRul authored Feb 20, 2024
2 parents a32b89b + 82740c2 commit b1af77b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lambdas/inference/src/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ def lambda_handler(event, context):
relevance_treshold=ENV_VARS["relevance_treshold"],
)
docs = retrieval.fetch_documents(query=query, top_k=ENV_VARS["top_k"])

if enable_history:
chat_history = json.loads(history.get(limit=10))

Expand All @@ -107,6 +106,8 @@ def lambda_handler(event, context):
history.add(
human_message=query, assistant_message=response, prompt=prompt
)

print(f"doc :{docs[0]}")
result = {
"completion": response,
"docs": json.dumps(
Expand Down

0 comments on commit b1af77b

Please sign in to comment.