Skip to content
This repository was archived by the owner on Sep 9, 2026. It is now read-only.

fix: make example payload a string and not bytes - #1587

Merged
JoanFM merged 1 commit into
mainfrom
fix-example-payload
May 30, 2023
Merged

JoanFM merged 1 commit into
mainfrom
fix-example-payload

Conversation

@JoanFM

@JoanFM JoanFM commented May 30, 2023 •

Copy link
Copy Markdown
Member

Before:

from docarray import DocList, BaseDoc
from docarray.documents import TextDoc
from docarray.typing import NdArray
import numpy as np


class MyDoc(BaseDoc):
    text: str
    embedding: NdArray[128]

print(f'{type(MyDoc.schema()["properties"]["embedding"]["example"])}')

This would show bytes.

Now this would show str

@samsja samsja left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch

Signed-off-by: Joan Fontanals Martinez <joan.martinez@jina.ai>
@github-actions

Copy link
Copy Markdown

📝 Docs are deployed on https://ft-fix-example-payload--jina-docs.netlify.app 🎉

@JoanFM
JoanFM merged commit 5ee8787 into main May 30, 2023
@JoanFM
JoanFM deleted the fix-example-payload branch May 30, 2023 14:22
@samsja samsja mentioned this pull request Jun 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants