File tree Expand file tree Collapse file tree
sample-code/spring-app/src/test/java/com/sap/ai/sdk/app/controllers Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33import static org .assertj .core .api .Assertions .assertThat ;
44
5+ import com .sap .ai .sdk .core .client .ConfigurationApi ;
6+ import com .sap .ai .sdk .core .model .AiConfigurationBaseData ;
57import com .sap .ai .sdk .core .model .AiDeployment ;
68import com .sap .ai .sdk .core .model .AiDeploymentStatus ;
9+ import com .sap .ai .sdk .foundationmodels .openai .OpenAiModel ;
710import org .junit .jupiter .api .Test ;
811
912class DeploymentTest {
10- /** Java end-to-end test specific configuration ID. "name":"config-java-e2e-test" */
11- public static final String CONFIG_ID = "67e8d039-c7f1-4179-9f8f-60d158a36b0e" ;
13+ /** Java end-to-end test specific configuration ID. "name":"config-java-e2e-test-gpt-5" */
14+ public static final String CONFIG_ID = "9db691a2-a136-41c9-8fe1-1ffad5a63594" ;
15+
16+ /**
17+ * Manual execution to create a new config for a new model when the current model gets deprecated.
18+ *
19+ * <p>1) Run the below method with a non-deprecated model.
20+ *
21+ * <p>2) Copy the printed ID into CONFIG_ID above.
22+ */
23+ // @Test
24+ void createConfiguration () {
25+ String modelToDeploy = OpenAiModel .GPT_5 .name ();
26+ var response =
27+ new ConfigurationApi ()
28+ .create (
29+ "default" ,
30+ AiConfigurationBaseData .create ()
31+ .name ("config-java-e2e-test-" + modelToDeploy )
32+ .executableId ("azure-openai" )
33+ .scenarioId ("foundation-models" ));
34+ System .out .println ("Created configuration with ID: " + response .getId ());
35+ }
1236
1337 @ Test
1438 void createDelete () {
You can’t perform that action at this time.
0 commit comments