You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you tag your image with something other than `my-langserve-app`,
64
-
note it for use in the next step.
64
+
note it for use in the next step.
65
65
66
66
### Running the Image Locally
67
67
@@ -77,3 +77,18 @@ We also expose port 8080 with the `-p 8080:8080` option.
77
77
```shell
78
78
docker run -e OPENAI_API_KEY=$OPENAI_API_KEY -p 8080:8080 my-langserve-app
79
79
```
80
+
# Connecting a Client
81
+
82
+
Example of invoking with `requests` in Python:
83
+
84
+
```python
85
+
import requests
86
+
87
+
response = requests.post(
88
+
"http://localhost:8000/search/invoke",
89
+
json={'input': 'cats'}
90
+
)
91
+
response.json()
92
+
```
93
+
94
+
You can also use [`RemoteRunnable` from LangServe](https://github.com/langchain-ai/langserve?tab=readme-ov-file#client) if calling your server from python or javascript.
0 commit comments