Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,10 +1,13 @@
|
|
1 |
from fastapi import FastAPI
|
2 |
from pydantic import BaseModel
|
|
|
|
|
3 |
from llama_index.core import Document, ServiceContext
|
4 |
from llama_index.llms.openai import OpenAI
|
5 |
from llama_index.core.node_parser import SemanticSplitterNodeParser
|
6 |
import os
|
7 |
|
|
|
8 |
app = FastAPI()
|
9 |
|
10 |
# Requête d'entrée
|
|
|
1 |
from fastapi import FastAPI
|
2 |
from pydantic import BaseModel
|
3 |
+
from typing import Optional # ✅ à AJOUTER ici
|
4 |
+
|
5 |
from llama_index.core import Document, ServiceContext
|
6 |
from llama_index.llms.openai import OpenAI
|
7 |
from llama_index.core.node_parser import SemanticSplitterNodeParser
|
8 |
import os
|
9 |
|
10 |
+
|
11 |
app = FastAPI()
|
12 |
|
13 |
# Requête d'entrée
|