java/resources/files/methods/content/index.md +0 −34 deleted
File Deleted View Diff
1## Retrieve file content
2
3`HttpResponse files().content(FileContentParamsparams = FileContentParams.none(), RequestOptionsrequestOptions = RequestOptions.none())`
4
5**get** `/files/{file_id}/content`
6
7Returns the contents of the specified file.
8
9### Parameters
10
11- `FileContentParams params`
12
13 - `Optional<String> fileId`
14
15### Example
16
17```java
18package com.openai.example;
19
20import com.openai.client.OpenAIClient;
21import com.openai.client.okhttp.OpenAIOkHttpClient;
22import com.openai.core.http.HttpResponse;
23import com.openai.models.files.FileContentParams;
24
25public final class Main {
26 private Main() {}
27
28 public static void main(String[] args) {
29 OpenAIClient client = OpenAIOkHttpClient.fromEnv();
30
31 HttpResponse response = client.files().content("file_id");
32 }
33}
34```