@RestController @Validated @RequestMapping(value="/completions") @ExposesResourceFor(value=CompletionProposalsResource.class) public class CompletionController extends Object
StreamCompletionProvider and TaskCompletionProvider as a REST API.| Constructor and Description |
|---|
CompletionController(StreamCompletionProvider completionProvider,
TaskCompletionProvider taskCompletionProvider)
Create a controller for the provided
StreamCompletionProvider and TaskCompletionProvider. |
| Modifier and Type | Method and Description |
|---|---|
CompletionProposalsResource |
completions(String start,
int detailLevel)
Return a list of possible completions given a prefix string that the user has started typing.
|
CompletionProposalsResource |
taskCompletions(String start,
int detailLevel)
Return a list of possible completions given a prefix string that the user has started typing.
|
public CompletionController(StreamCompletionProvider completionProvider, TaskCompletionProvider taskCompletionProvider)
StreamCompletionProvider and TaskCompletionProvider.@RequestMapping(value="/stream") public CompletionProposalsResource completions(@RequestParam(value="start") String start, @RequestParam(value="detailLevel",defaultValue="1") @Min(value=1L,message="The provided detail level must be greater than zero.") int detailLevel)
start - the amount of text written so fardetailLevel - the level of detail the user wants in completions, starting at 1.
Higher values request more detail, with values typically in the range [1..5]@RequestMapping(value="/task") public CompletionProposalsResource taskCompletions(@RequestParam(value="start") String start, @RequestParam(value="detailLevel",defaultValue="1") @Min(value=1L,message="The provided detail level must be greater than zero.") int detailLevel)
start - the amount of text written so fardetailLevel - the level of detail the user wants in completions, starting at 1.
Higher values request more detail, with values typically in the range [1..5]Copyright © 2017 Pivotal Software, Inc.. All rights reserved.