11package meet_at_mensa .matching .client ;
22
3- import org .openapitools .client .Configuration ;
43import org .openapitools .client .api .GenAiApi ;
54import org .springframework .stereotype .Service ;
65
76import meet_at_mensa .matching .exception .RestException ;
8- import meet_at_mensa .matching .repository .GroupRepository ;
9- import meet_at_mensa .matching .service .ConversationStarterService ;
107
118import org .openapitools .client .ApiClient ;
129
1512import org .openapitools .model .ConversationStarter ;
1613import org .openapitools .model .ConversationStarterCollection ;
1714
18- import org .openapitools .client .auth .*;
19-
2015/**
2116 * GenAiClient uses the generated java client to handle REST requests to the GenAi-Microservice
22- *
23- * WARNING: This class is currently non-functional due to complications with Auth0
24- *
25- * TODO: @AK - Implement Authentication
2617 *
2718 */
2819@ Service
@@ -32,8 +23,8 @@ public class GenAiClient {
3223
3324 public GenAiClient () {
3425
35- // get default client
36- this .defaultClient = Configuration . getDefaultApiClient ();
26+ // get new client
27+ this .defaultClient = new ApiClient ();
3728
3829 // set path
3930 this .defaultClient .setBasePath ("http://meetatmensa-genai:80" );
@@ -44,9 +35,6 @@ public GenAiClient() {
4435 /**
4536 * Uses a Generated client to a REST request to genai-service for a ConverationStarterCollection object
4637 *
47- * WARNING: This currently fails due to missing authentication!
48- *
49- * TODO: @AK Figure out auth0
5038 *
5139 * @param users server-style UserCollection object of the user being fetched
5240 * @return server-style ConversationStarterCollection object (org.openapitools.model.ConversationStarterCollection)
@@ -56,6 +44,8 @@ public ConversationStarterCollection getPrompts(UserCollection users) {
5644 // create instance of the API
5745 GenAiApi apiInstance = new GenAiApi (this .defaultClient );
5846
47+ System .out .println ("Users being sent:" + users .toString ());
48+
5949 try {
6050
6151 // initiate object
0 commit comments