Skip to content

Commit d4c7d78

Browse files
authored
Merge pull request #21 from DefangLabs/linda-coffee-chat-dates
fix dates for coffee chat
2 parents ff8896f + 5770253 commit d4c7d78

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

app/rag_system.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import openai
22
import json
33
import os
4+
from datetime import date
45
from sentence_transformers import SentenceTransformer
56
import numpy as np
67
from sklearn.metrics.pairwise import cosine_similarity
@@ -70,6 +71,7 @@ def answer_query_stream(self, query):
7071
"When the user says 'you', 'your', or any pronoun, interpret it as referring to Defang with context of Defang. "
7172
"If the user's question involves comparisons with or references to other services, you may use external knowledge. "
7273
"However, if the question is strictly about Defang, you must ignore all external knowledge and only utilize the given context. "
74+
"Today's date is " + date.today().strftime('%B %d, %Y') + ". "
7375
"Context: " + context
7476
)
7577
}

0 commit comments

Comments
 (0)