diff --git a/README.md b/README.md index 0f7c961..43e16f2 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ + # Install ```commandline pip install . diff --git a/tilellm/__main__.py b/tilellm/__main__.py index 9522056..48089a9 100644 --- a/tilellm/__main__.py +++ b/tilellm/__main__.py @@ -82,6 +82,7 @@ async def reader(channel: aioredis.client.Redis): byte_str = message_values[b"single"] dict_str = byte_str.decode("UTF-8") + logger.info(dict_str) item = ast.literal_eval(dict_str) itemSingle = ItemSingle(**item) webhook = item.get('webhook',"") diff --git a/tilellm/models/item_model.py b/tilellm/models/item_model.py index 6dfa9f1..b68c97e 100644 --- a/tilellm/models/item_model.py +++ b/tilellm/models/item_model.py @@ -5,17 +5,17 @@ class ItemSingle(BaseModel): id: str source: str | None = None - type: str |None = None - content: str |None =None - gptkey: str |None =None + type: str | None = None + content: str | None =None + gptkey: str | None = None embedding: str = Field(default_factory=lambda: "text-embedding-ada-002") - namespace: str |None =None - webhook: str |None =None + namespace: str | None =None + webhook: str = Field(default_factory=lambda: "") class MetadataItem(BaseModel): id: str source: str | None = None - type: str |None = None + type: str | None = None embedding: str = Field(default_factory=lambda: "text-embedding-ada-002") class ChatEntry(BaseModel): diff --git a/tilellm/store/pinecone_repository.py b/tilellm/store/pinecone_repository.py index 565e707..7bc1f1f 100644 --- a/tilellm/store/pinecone_repository.py +++ b/tilellm/store/pinecone_repository.py @@ -140,6 +140,7 @@ def get_pc_ids_namespace(id:str, namespace:str): # vector_store = Pinecone.from_existing_index(const.PINECONE_INDEX, ) describe = index.describe_index_stats() + logger.debug(describe) namespaces = describe.get("namespaces", {}) total_vectors = 1