GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — java-sdk/assistant at develop · windofthesky/java-sdk

Expand file tree

/

assistant

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
 
 
/

assistant

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
src
src
 
 
README.md
README.md
 
 
build.gradle
build.gradle
 
 

README.md

Outline

Assistant

Installation

Maven
<dependency>
  <groupId>com.ibm.watson.developer_cloud</groupId>
  <artifactId>assistant</artifactId>
  <version>5.1.1</version>
</dependency>
Gradle
'com.ibm.watson.developer_cloud:assistant:5.1.1'

Usage

Use the Assistant service to identify intents, entities, and conduct conversations.

Assistant service = new Assistant("2018-02-16");
service.setUsernameAndPassword("<username>", "<password>");

InputData input = new InputData.Builder("Hi").build();
MessageOptions options = new MessageOptions.Builder(workspaceId)
  .input(input)
  .build();
MessageResponse response = service.message(options).execute();
System.out.println(response);

Moving from Node 1 to Node 2.

Context context = null;

// first message
MessageOptions newMessageOptions = new MessageOptions.Builder()
  .workspaceId("<workspace-id>")
  .input(new InputData.Builder("First message").build())
  .context(context)
  .build();

MessageResponse response = service.message(newMessageOptions).execute();

// second message
newMessageOptions = new MessageOptions.Builder()
  .workspaceId("<workspace-id>")
  .input(new InputData.Builder("Second message").build())
  .context(response.getContext()) // output context from the first message
  .build();

response = service.message(newMessageOptions).execute();

System.out.println(response);
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.