MCPcopy Create free account
hub / github.com/Azure-Samples/rag-postgres-openai-python / ItemPublic

Class ItemPublic

src/backend/fastapi_app/api_models.py:31–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29
30
31class ItemPublic(BaseModel):
32 id: int
33 type: str
34 brand: str
35 name: str
36 description: str
37 price: float
38
39 def to_str_for_rag(self):
40 return f"Name:{self.name} Description:{self.description} Price:{self.price} Brand:{self.brand} Type:{self.type}"
41
42
43class ItemWithDistance(ItemPublic):

Calls

no outgoing calls