@@ -68,15 +68,25 @@ Read the documentation for more configuration options.
6868
6969### Example: creating a resource
7070
71- To create a new project , first use the ` ProjectCreateParams ` builder to specify attributes,
72- then pass that to the ` create ` method of the ` projects ` service.
71+ To create a new inference pipeline data , first use the ` InferencePipelineDataStreamParams ` builder to specify attributes,
72+ then pass that to the ` stream ` method of the ` data ` service.
7373
7474``` java
75- import com.openlayer.api.models.ProjectCreateParams ;
76- import com.openlayer.api.models.ProjectCreateResponse ;
77-
78- ProjectCreateParams params = ProjectCreateParams . builder(). build();
79- ProjectCreateResponse projectCreateResponse = client. projects(). create(params);
75+ import com.openlayer.api.models.InferencePipelineDataStreamParams ;
76+ import com.openlayer.api.models.InferencePipelineDataStreamResponse ;
77+ import java.util.List ;
78+
79+ InferencePipelineDataStreamParams params = InferencePipelineDataStreamParams . builder()
80+ .rows(List . of(InferencePipelineDataStreamParams . Row . builder(). build()))
81+ .config(InferencePipelineDataStreamParams . Config . ofLlmData(InferencePipelineDataStreamParams . Config . LlmData . builder()
82+ .outputColumnName(" output" )
83+ .costColumnName(" cost" )
84+ .inputVariableNames(List . of(" user_query" ))
85+ .numOfTokenColumnName(" tokens" )
86+ .timestampColumnName(" timestamp" )
87+ .build()))
88+ .build();
89+ InferencePipelineDataStreamResponse inferencePipelineDataStreamResponse = client. inferencePipelines(). data(). stream(params);
8090```
8191
8292---
@@ -87,14 +97,14 @@ ProjectCreateResponse projectCreateResponse = client.projects().create(params);
8797
8898To make a request to the Openlayer API, you generally build an instance of the appropriate ` Params ` class.
8999
90- In [ Example: creating a resource] ( #example-creating-a-resource ) above, we used the ` ProjectCreateParams .builder()` to pass to
91- the ` create ` method of the ` projects ` service.
100+ In [ Example: creating a resource] ( #example-creating-a-resource ) above, we used the ` InferencePipelineDataStreamParams .builder()` to pass to
101+ the ` stream ` method of the ` data ` service.
92102
93103Sometimes, the API may support other properties that are not yet supported in the Java SDK types. In that case,
94104you can attach them using the ` putAdditionalProperty ` method.
95105
96106``` java
97- ProjectCreateParams params = ProjectCreateParams . builder()
107+ InferencePipelineDataStreamParams params = InferencePipelineDataStreamParams . builder()
98108 // ... normal properties
99109 .putAdditionalProperty(" secret_param" , " 4242" )
100110 .build();
@@ -107,7 +117,7 @@ ProjectCreateParams params = ProjectCreateParams.builder()
107117When receiving a response, the Openlayer Java SDK will deserialize it into instances of the typed model classes. In rare cases, the API may return a response property that doesn't match the expected Java type. If you directly access the mistaken property, the SDK will throw an unchecked ` OpenlayerInvalidDataException ` at runtime. If you would prefer to check in advance that that response is completely well-typed, call ` .validate() ` on the returned model.
108118
109119``` java
110- ProjectCreateResponse projectCreateResponse = client. projects (). create (). validate();
120+ InferencePipelineDataStreamResponse inferencePipelineDataStreamResponse = client. inferencePipelines (). data() . stream (). validate();
111121```
112122
113123### Response properties as JSON
@@ -137,7 +147,7 @@ if (field.isMissing()) {
137147Sometimes, the server response may include additional properties that are not yet available in this library's types. You can access them using the model's ` _additionalProperties ` method:
138148
139149``` java
140- JsonValue secret = projectCreateResponse . _additionalProperties(). get(" secret_field" );
150+ JsonValue secret = inferencePipelineDataStreamResponse . _additionalProperties(). get(" secret_field" );
141151```
142152
143153---
0 commit comments