Skip to content

Commit

Permalink
comments updated
Browse files Browse the repository at this point in the history
Signed-off-by: Xun Zhang <[email protected]>
  • Loading branch information
Zhangxunmt committed Dec 15, 2023
1 parent 219aeac commit f1c3057
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class ActionConstants {
public final static String RESPONSE_CONVERSATION_LIST_FIELD = "conversations";
/** name of list on interactions in all responses */
public final static String RESPONSE_INTERACTION_LIST_FIELD = "interactions";
/** name of list on interactions in all responses */
/** name of list on traces in all responses */
public final static String RESPONSE_TRACES_LIST_FIELD = "traces";
/** name of interaction Id field in all responses */
public final static String RESPONSE_INTERACTION_ID_FIELD = "interaction_id";
Expand Down Expand Up @@ -65,12 +65,11 @@ public class ActionConstants {
public final static String GET_CONVERSATIONS_REST_PATH = BASE_REST_PATH + "/_list";
/** path for update conversations */
public final static String UPDATE_CONVERSATIONS_REST_PATH = BASE_REST_PATH + "/{conversation_id}/_update";
/** path for put interaction */
/** path for create interaction */
public final static String CREATE_INTERACTION_REST_PATH = BASE_REST_PATH + "/{conversation_id}/_create";
/** path for get interactions */
public final static String GET_INTERACTIONS_REST_PATH = BASE_REST_PATH + "/{conversation_id}/_list";
/** path for get interactions */
/** path for get traces */
public final static String GET_TRACES_REST_PATH = "/_plugins/_ml/memory/trace" + "/{interaction_id}/_list";
/** path for delete conversation */
public final static String DELETE_CONVERSATION_REST_PATH = BASE_REST_PATH + "/{conversation_id}/_delete";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,13 @@ public class GetTracesTransportAction extends HandledTransportAction<GetTracesRe
* @param actionFilters for filtering actions
* @param cmHandler Handler for conversational memory operations
* @param client OS Client for dealing with OS
* @param clusterService for some cluster ops
*/
@Inject
public GetTracesTransportAction(
TransportService transportService,
ActionFilters actionFilters,
OpenSearchConversationalMemoryHandler cmHandler,
Client client,
ClusterService clusterService
Client client
) {
super(GetTracesAction.NAME, transportService, actionFilters, GetTracesRequest::new);
this.client = client;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@ public class GetTracesTransportActionTests extends OpenSearchTestCase {
@Mock
Client client;

@Mock
ClusterService clusterService;

@Mock
TransportService transportService;

Expand Down Expand Up @@ -82,11 +79,8 @@ public void setup() throws IOException {
this.threadContext = new ThreadContext(settings);
when(this.client.threadPool()).thenReturn(this.threadPool);
when(this.threadPool.getThreadContext()).thenReturn(this.threadContext);
when(this.clusterService.getSettings()).thenReturn(settings);
when(this.clusterService.getClusterSettings())
.thenReturn(new ClusterSettings(settings, Set.of(ConversationalIndexConstants.ML_COMMONS_MEMORY_FEATURE_ENABLED)));

this.action = spy(new GetTracesTransportAction(transportService, actionFilters, cmHandler, client, clusterService));
this.action = spy(new GetTracesTransportAction(transportService, actionFilters, cmHandler, client));
}

public void testGetTraces_noMorePages() {
Expand Down

0 comments on commit f1c3057

Please sign in to comment.