Package org.vrspace.server.api
Class Agents
java.lang.Object
org.vrspace.server.api.ApiBase
org.vrspace.server.api.ClientControllerBase
org.vrspace.server.api.Agents
@RestController
@RequestMapping("/vrspace/api/agents")
public class Agents
extends ClientControllerBase
Communicate with AI agents in virtual worlds. Only available to clients in a world. Each agent has own chat memory, but that
may change (conversation context may eventually be passed between agents).
- Author:
- joe
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanorg.springframework.http.ResponseEntity<String> sceneAgent(jakarta.servlet.http.HttpSession session, String query) Scene agent has access to the scene of the client, so it can answer user queries from the same point of view.org.springframework.http.ResponseEntity<SearchAgent.SearchAgentResponse> searchAgent(jakarta.servlet.http.HttpSession session, String query) Semantic and contextual search agent.Methods inherited from class org.vrspace.server.api.ClientControllerBase
findClient, findClient, getAuthorisedClient, getAuthorisedClient, isAuthenticatedMethods inherited from class org.vrspace.server.api.ApiBase
currentUserName, isAuthenticated
-
Field Details
-
PATH
- See Also:
-
MEMORY_REPOSITORY_ATTRIBUTE
- See Also:
-
SEARCH_MEMORY_ATTRIBUTE
- See Also:
-
SCENE_MEMORY_ATTRIBUTE
- See Also:
-
-
Constructor Details
-
Agents
public Agents()
-
-
Method Details
-
agentsEnabled
@GetMapping("/enabled") public boolean agentsEnabled() -
searchAgent
@PostMapping("/search") public org.springframework.http.ResponseEntity<SearchAgent.SearchAgentResponse> searchAgent(jakarta.servlet.http.HttpSession session, @RequestBody String query) Semantic and contextual search agent. It can search Sketchfab, or local database, for models that user described. Chat memory is bound to the client session, and number of messages memorized is configured on the server.- Parameters:
query-
-
sceneAgent
@PostMapping("/scene") public org.springframework.http.ResponseEntity<String> sceneAgent(jakarta.servlet.http.HttpSession session, @RequestBody String query) Scene agent has access to the scene of the client, so it can answer user queries from the same point of view. Builds the description of the visible part of the world, and uses it as the context to answer the user query (e.g. what is this, where is that). Chat memory is bound to the client session, and number of messages memorized is configured on the server.- Parameters:
query- Question related to the scene.- Returns:
- the answer given by the agent
-