mirror of
https://github.com/aljazceru/dev-gpt.git
synced 2026-01-03 05:44:22 +01:00
👨💻 fix: host
This commit is contained in:
@@ -307,9 +307,12 @@ print(response[0].text) # can also be blob in case of image/audio..., this shoul
|
||||
Note that the response will always be in response[0].text
|
||||
The playground displays a code block containing the microservice specific curl code that can be used to send the request to the microservice.
|
||||
Example:
|
||||
|
||||
deployment_id = os.environ.get("K8S_NAMESPACE_NAME", "")
|
||||
host = 'https://gptdeploy-{{deployment_id.split('-')[1}}.wolf.jina.ai/post' if deployment_id else "http://localhost:8080/post"
|
||||
with st.expander("See curl command"):
|
||||
st.code(
|
||||
'curl -X POST -H "Content-Type: application/json" -d \'[{{"text": "<different for each microservice>"}}]\' <host>'
|
||||
f'curl -X \\'POST\\' \\'host\\' -H \\'accept: application/json\\' -H \\'Content-Type: application/json\\' -d \\'{{{{"data": [{{{{"text": "hello, world!"}}}}]}}}}\\''
|
||||
language='bash'
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user