Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a76cc61

Browse filesBrowse files
authored
docs: fix fastapi (#1453)
Signed-off-by: samsja <sami.jaghouar@hotmail.fr>
1 parent a36522c commit a76cc61
Copy full SHA for a76cc61

1 file changed

+2-2Lines changed: 2 additions & 2 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎docs/user_guide/sending/api/fastAPI.md‎

Copy file name to clipboardExpand all lines: docs/user_guide/sending/api/fastAPI.md
+2-2Lines changed: 2 additions & 2 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,14 @@ from fastapi import FastAPI
3838
from httpx import AsyncClient
3939

4040
from docarray.documents import ImageDoc
41-
from docarray.base_doc import DocumentResponse
41+
from docarray.base_doc import DocArrayResponse
4242

4343
input_doc = InputDoc(img=ImageDoc(tensor=np.zeros((3, 224, 224))))
4444

4545
app = FastAPI()
4646

4747

48-
@app.post("/doc/", response_model=OutputDoc, response_class=DocumentResponse)
48+
@app.post("/doc/", response_model=OutputDoc, response_class=DocArrayResponse)
4949
async def create_item(doc: InputDoc) -> OutputDoc:
5050
## call my fancy model to generate the embeddings
5151
doc = OutputDoc(

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.