@@ -68,25 +68,15 @@ Read the documentation for more configuration options.
6868
6969### Example: creating a resource
7070
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.
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.
7373
7474``` java
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);
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);
9080```
9181
9282---
@@ -97,14 +87,14 @@ InferencePipelineDataStreamResponse inferencePipelineDataStreamResponse = client
9787
9888To make a request to the Openlayer API, you generally build an instance of the appropriate ` Params ` class.
9989
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.
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.
10292
10393Sometimes, the API may support other properties that are not yet supported in the Java SDK types. In that case,
10494you can attach them using the ` putAdditionalProperty ` method.
10595
10696``` java
107- InferencePipelineDataStreamParams params = InferencePipelineDataStreamParams . builder()
97+ ProjectCreateParams params = ProjectCreateParams . builder()
10898 // ... normal properties
10999 .putAdditionalProperty(" secret_param" , " 4242" )
110100 .build();
@@ -117,7 +107,7 @@ InferencePipelineDataStreamParams params = InferencePipelineDataStreamParams.bui
117107When 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.
118108
119109``` java
120- InferencePipelineDataStreamResponse inferencePipelineDataStreamResponse = client. inferencePipelines (). data() . stream (). validate();
110+ ProjectCreateResponse projectCreateResponse = client. projects (). create (). validate();
121111```
122112
123113### Response properties as JSON
@@ -147,7 +137,7 @@ if (field.isMissing()) {
147137Sometimes, 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:
148138
149139``` java
150- JsonValue secret = inferencePipelineDataStreamResponse . _additionalProperties(). get(" secret_field" );
140+ JsonValue secret = projectCreateResponse . _additionalProperties(). get(" secret_field" );
151141```
152142
153143---
0 commit comments