mirror of
https://github.com/imartinez/privateGPT.git
synced 2025-09-23 12:07:12 +00:00
Update poetry lock (#1209)
* Update the version of llama_index used to fix transient openai errors * Update poetry.lock file * Make `local` mode the default mode by default
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
from typing import Literal
|
||||
|
||||
from fastapi import APIRouter
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
@@ -16,8 +18,8 @@ class ChunksBody(BaseModel):
|
||||
|
||||
|
||||
class ChunksResponse(BaseModel):
|
||||
object: str = Field(enum=["list"])
|
||||
model: str = Field(enum=["private-gpt"])
|
||||
object: Literal["list"]
|
||||
model: Literal["private-gpt"]
|
||||
data: list[Chunk]
|
||||
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
from typing import TYPE_CHECKING
|
||||
from typing import TYPE_CHECKING, Literal
|
||||
|
||||
from injector import inject, singleton
|
||||
from llama_index import ServiceContext, StorageContext, VectorStoreIndex
|
||||
@@ -19,7 +19,7 @@ if TYPE_CHECKING:
|
||||
|
||||
|
||||
class Chunk(BaseModel):
|
||||
object: str = Field(enum=["context.chunk"])
|
||||
object: Literal["context.chunk"]
|
||||
score: float = Field(examples=[0.023])
|
||||
document: IngestedDoc
|
||||
text: str = Field(examples=["Outbound sales increased 20%, driven by new leads."])
|
||||
|
Reference in New Issue
Block a user