danswer/backend/shared_models/model_server_models.py
Yuhong Sun 7433dddac3
Model Server (#695)
Provides the ability to pull out the NLP models into a separate model server which can then be hosted on a GPU instance if desired.
2023-11-06 16:36:09 -08:00

27 lines
405 B
Python

from pydantic import BaseModel
class EmbedRequest(BaseModel):
texts: list[str]
class EmbedResponse(BaseModel):
embeddings: list[list[float]]
class RerankRequest(BaseModel):
query: str
documents: list[str]
class RerankResponse(BaseModel):
scores: list[list[float]]
class IntentRequest(BaseModel):
query: str
class IntentResponse(BaseModel):
class_probs: list[float]