Embedding_restapi / schemas /input_schemas.py
Ezhil
Initial commit
1aa4489
raw
history blame contribute delete
574 Bytes
from pydantic import BaseModel
from typing import List
# Request schema for computing cosine similarity
class CosineSimilarityInput(BaseModel):
text1: str
text2: str
# Request schema for SMS classification
class MessageInput(BaseModel):
message: str
# Request schema for computing embeddings
class EmbeddingInput(BaseModel):
message: str
# Response schema for cosine similarity
class CosineSimilarityResponse(BaseModel):
cosine_similarity: float
# Response schema for embeddings
class EmbeddingResponse(BaseModel):
embeddings: List[List[float]]