Comments (10)
Note that removing theMyDocument.other_doc
field makes the example work again.
from jina.
Hey @NarekA,
Thanks for reporting the issue. If you have a fix proposal we would be glad to get the contribution
from jina.
Of these solutions, do any of them make more sense to you?
Use http get with a body. See this link
Sending a body with a GET request has an undefined behavior in the specifications, nevertheless, it is supported by FastAPI, only for very complex/extreme use cases.
I like this one, but it looks like fastAPI might not include the fields in the docs.
- Use a different http method
The best solution if it's possible
- Serialize/deserialize the fields before IO.
Might make more sense to serialize the whole object as one param rather than try serializing individual params
Any reason we can't use http post
?
from jina.
@JoanFM Any reason this is using get?
from jina.
@alaeddine-13 may have better insights as per this
from jina.
@NarekA Actually the convention when implementing SSE in HTTP is to use GET methods instead of POST. The drawback of using GET is having to serialize the document as query string parameters. However, developers can use clients that follow the convention when using SSE. For instance, mozilla's js client EventSource implements SSE client using GET method.
I suggest flattening your document schema in case
@JoanFM I remember wanting to include a duplicate POST method for such a case, such that, if you want to follow convention -> use GET endpoint and if you want nested schemas -> use POST endpoint
from jina.
@alaeddine-13 we are currently working around this by "flattening" the document, but that effectively removes any benefits of the upgrade to Docarray V2. It also means that the framework doesn't support all docarray inputs (for http at least) and that should be communicated. Would it be hard to create a second endpoint? I could look into this one if it helps.
from jina.
We are definitely going to look into solving this issue. Yoy are right, in the Documentation is not stated
from jina.
@JoanFM @alaeddine-13 I drafted a PR that seems to fix this issue for me: https://github.com/jina-ai/jina/pull/6091/files
from jina.
It seems nice @NarekA,
I added some comments to the PR
from jina.
Related Issues (20)
- opentelemetry-exporter-prometheus version conflict
- Release Note
- Will the Pydantic dependency be upgraded in the future?Currently, due to version issues, some third-party packages are incompatible. HOT 10
- `StableLM` example from the homepage doesn't work properly. HOT 14
- Release Notes (3.23.2)
- Error on joining branches: Flow is aborted due to ['gateway'] can not be started. HOT 1
- Cannot serialize subfield objects properly HOT 6
- Release Notes 3.23.3
- Two fields with the same type are conflicted with KeyError in pydantic HOT 9
- Fix code scanning alert - Information exposure through an exception HOT 1
- Release Notes 3.23.4
- Release Note 3.23.5
- Release Note 3.24.0
- float being checked as a list HOT 3
- Release Notes 3.24.1
- How to solve this error? HOT 9
- Release Notes 3.25.0
- Release Note 3.25.1
- After killing the process, it becomes a zombie process HOT 7
- Engine consumes a large amount of Memory. What methods can be used to optimize memory usage? HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jina.