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
[Langflow documentation for running a flow](https://docs.langflow.org/api/simplified-run-flow).
96
+
94
97
Once you have a client, you can create a reference to a flow using the `flowID`. This can be found in the API modal in Langflow.
95
98
96
99
```js
@@ -193,6 +196,8 @@ There's more [documentation and examples of a streaming response in the Langflow
193
196
194
197
### File upload
195
198
199
+
[Langflow documentation for file upload API](https://docs.langflow.org/api/upload-file-1).
200
+
196
201
Chat input components support files as input as well as text. You need to upload your file first, using the file upload function, then provide the file path to the flow as a tweak.
[Langflow documentation for the logs API](https://docs.langflow.org/api/logs).
219
+
213
220
#### Fetching the logs
214
221
215
-
You can fetch the logs for the your Langflow instance. You can either fetch the logs.
222
+
You can fetch the logs for the your Langflow instance.
216
223
217
224
```js
218
225
constlogs=awaitclient.logs.fetch();
219
226
```
220
227
221
-
Or stream the logs:
228
+
When fetching the logs, you can pass a `timestamp` and either a number of `lines_before` or `lines_after` the timestamp. For example, the following code will get the 10 log lines that happened after 1 hour ago:
229
+
230
+
```js
231
+
constlogs=awaitclient.logs.fetch({
232
+
timestamp:Date.now() -60*60*1000,
233
+
lines_after:10,
234
+
});
235
+
```
236
+
237
+
#### Streaming the logs
238
+
239
+
You can also stream the logs by requesting the [streaming endpoint](https://docs.langflow.org/api/stream-logs).
0 commit comments