updated file id to type string
Browse files- app.py +1 -1
- utils/embedding_utils.py +1 -1
app.py
CHANGED
@@ -34,7 +34,7 @@ class DocumentIndexRequest(BaseModel):
|
|
34 |
bucket_key: str
|
35 |
user_id: str
|
36 |
org_id: str
|
37 |
-
file_id:
|
38 |
data_source_id: int
|
39 |
|
40 |
@app.get("/")
|
|
|
34 |
bucket_key: str
|
35 |
user_id: str
|
36 |
org_id: str
|
37 |
+
file_id: str
|
38 |
data_source_id: int
|
39 |
|
40 |
@app.get("/")
|
utils/embedding_utils.py
CHANGED
@@ -43,7 +43,7 @@ model.max_seq_length = 4096
|
|
43 |
model.tokenizer.padding_side = "right"
|
44 |
|
45 |
|
46 |
-
def read_document(file_content: bytes, file_id:
|
47 |
"""Extract text content from a document file depending on its format."""
|
48 |
try:
|
49 |
# Create a temporary directory to save the file
|
|
|
43 |
model.tokenizer.padding_side = "right"
|
44 |
|
45 |
|
46 |
+
def read_document(file_content: bytes, file_id: str, file_format: str) -> str:
|
47 |
"""Extract text content from a document file depending on its format."""
|
48 |
try:
|
49 |
# Create a temporary directory to save the file
|