jina-ai / serve

☁️ Build multimodal AI applications with cloud-native stack
https://jina.ai/serve
Apache License 2.0
21.14k stars 2.22k forks source link

How to set GET method? #6073

Closed xuhaoguang closed 4 months ago

xuhaoguang commented 1 year ago

image This is default POST method, But how can I set it's a GET method?

JoanFM commented 1 year ago

Hey @xuhaoguang ,

You do not need to set it, Jina detects that there is a generator being returned and because of that exposes a GET endpoint when served via HTTP.

xuhaoguang commented 1 year ago

ehh, But how can I use curl "localhost:12345/hc" to health_check method, but when I test, jina say I should send a json post data and Method Not Allowed

xuhaoguang commented 1 year ago

image

JoanFM commented 1 year ago

how are u defining this hc endpoint?

xuhaoguang commented 1 year ago

image

that-rahul-guy commented 1 year ago

@xuhaoguang Did you find any workaround? I'm struggling with same.

JoanFM commented 1 year ago

@that-rahul-guy what are you trying to do?

that-rahul-guy commented 1 year ago

Hi @JoanFM I am currently exploring jina as a framework to serve my LangChain Agent-tool architecture application. As for the GET method I was trying a similar thing what @xuhaoguang shared.

reshma045 commented 11 months ago

Hey @xuhaoguang, which folder is that file in?

jina-bot commented 8 months ago

@jina-ai/product This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 14 days

jina-bot commented 5 months ago

@jina-ai/product This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 14 days