Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -337,8 +337,9 @@ channel_id = "UCsv3kmQ5k1eIRG2R9mWN" # iCodeGuru
|
|
| 337 |
BASE_URL = "https://icode.guru"
|
| 338 |
|
| 339 |
groq_client = Groq(api_key=GROQ_API_KEY)
|
| 340 |
-
|
| 341 |
-
|
|
|
|
| 342 |
|
| 343 |
chroma_client = chromadb.Client()
|
| 344 |
collection = chroma_client.get_or_create_collection("icodeguru_knowledge", embedding_function=embedding_function)
|
|
|
|
| 337 |
BASE_URL = "https://icode.guru"
|
| 338 |
|
| 339 |
groq_client = Groq(api_key=GROQ_API_KEY)
|
| 340 |
+
from chromadb.utils.embedding_functions import SentenceTransformerEmbeddingFunction
|
| 341 |
+
|
| 342 |
+
embedding_function = SentenceTransformerEmbeddingFunction("all-MiniLM-L6-v2")
|
| 343 |
|
| 344 |
chroma_client = chromadb.Client()
|
| 345 |
collection = chroma_client.get_or_create_collection("icodeguru_knowledge", embedding_function=embedding_function)
|