mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-05-19 08:10:13 +02:00
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.
27 lines
405 B
Python
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]
|