{"openapi":"3.0.3","info":{"version":"2.0.22","title":"NeuralSeek","description":"NeuralSeek - The business LLM accelerator","license":{"name":"End User License Agreement","url":"https://neuralseek.com/eula"},"contact":{"name":"NeuralSeek Support","url":"https://neuralseek.com","email":"support@NeuralSeek.com"},"termsOfService":"https://neuralseek.com/eula"},"servers":[{"url":"https://api.neuralseek.com/v1/{instance}","description":"NeuralSeek API server","variables":{"instance":{"default":"undefined","description":"Your instance ID"}}}],"paths":{"/seek":{"post":{"tags":["Seek"],"summary":"Seek an answer from NeuralSeek","description":"This endpoint takes an input object with a user question, context and options and returns a response object","operationId":"seek","requestBody":{"description":"The request object. Must include the question and a context.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/seek"}}}},"responses":{"200":{"description":"Answer response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/seek_response"}}}}},"security":[{"apiKey":[]},{"embedcode":[]}]}},"/seek_stream":{"post":{"tags":["Seek"],"summary":"Stream a Seek an answer from NeuralSeek","description":"This endpoint takes an input object with a user question, context and options and returns a response object","operationId":"seek_stream","requestBody":{"description":"The request object. Must include the question and a context.","required":true,"content":{"application/json":{"schema":{"type":"object","required":["question"],"properties":{"question":{"type":"string","default":"","description":"The user's question for NeuralSeek"},"user_session":{"type":"object","properties":{"metadata":{"type":"object","properties":{"user_id":{"type":"string","default":"","description":"A unique user identifier."}}},"system":{"type":"object","properties":{"session_id":{"type":"string","default":"","description":"A session identifier for the defined user."}}}},"description":"Context tracking object. You must set at least one of user_id or session_id to enable context keeping."},"params":{"type":"array","description":"An array of parameters to use in evaluation of the seek when calling mAIstro during a seek.","items":{"type":"object","properties":{"name":{"type":"string","default":"","description":"The parameter name"},"value":{"type":"string","default":"","description":"The parameter value"}}}},"options":{"type":"object","properties":{"personalize":{"type":"object","description":"An object that allows NeuralSeek to tailor a response for a specific user","properties":{"preferredName":{"type":"string","default":"","description":"The name the user should be referred to by"},"noWelcome":{"type":"string","default":"","description":"The user has already been welcomed, do not re-welcome. Valid value is 'true' or 'false'. Default value is 'false'."},"forceFirstPerson":{"type":"string","default":"","description":"Use a first-person speaking style, even if no preferredName is set. Valid value is 'true' or 'false'. Default value is 'false'."},"products":{"type":"array","description":"An array of products this customer currently consumes from your company","items":{"type":"string"}},"additionalDetails":{"type":"string","default":"","description":"Additional details to pass to language generation"}}},"proposalID":{"type":"string","default":"","description":"Override all settings by passing a NeuralSeek Proposal ID."},"seekLLM":{"type":"string","default":"","description":"Override the LLM load balancer and force seek to use a specific LLM. Input the LLM code here. You must have a valid model card set up on the configure tab for the code you input."},"language":{"type":"string","default":"","description":"Valid values are: en, es, de, it, fr, ja, ar"},"filter":{"type":"string","default":"","description":"Text to use as a filter against the filter field set in the KnowledgeBase configuration. Use commas to separate multiple strings for an 'or' filter. You can use the filter to isolate a certain subset of documents in the knowledgebase."},"lastTurn":{"type":"array","description":"lastTurn is a flexible object. It is backwards compatible with the original single turn object, as well as compatible with the Watson Assistant session history format.","items":{"type":"object","properties":{"input":{"type":"string","default":"","description":"The user input"},"response":{"type":"string","default":"","description":"The system response. Text strings only here. "}}}},"promptEngineering":{"type":"string","default":"","description":"Enable Prompt engineering. Valid values are the strings 'true' and 'false'"},"promptEngineeringPhrase":{"type":"string","default":"","description":"Prepend a phrase to cleansed user input. Must enable Prompt Engineering inside the NeuralSeek \"Configure\" page"},"answerLength":{"type":"integer","minimum":1,"maximum":4,"description":"The verbosity of the answer. A whole number 1-4"},"url":{"type":"string","default":"","description":"URL of the current page when using with a web-based Virtual Agent"},"stump":{"type":"string","default":"","description":"Stump Speech text. Fallback for when all else fails."},"includeSourceResults":{"type":"boolean","default":false,"description":"Include generation source results. Defaults to false."},"includeHighlights":{"type":"boolean","default":false,"description":"Include highlights from source results. Defaults to false."},"includeSourceResultsFormatted":{"type":"boolean","default":false,"description":"Include generation source results, and output them into a formatted string. Defaults to false."},"sourceResultsNumber":{"type":"integer","default":3,"minimum":1,"maximum":30,"description":"When including source results, how many to include.'"},"sourceResultsSummaryLength":{"type":"integer","default":100,"minimum":0,"maximum":2000,"description":"When including source results, how long of a summary to include.'"},"returnVariables":{"type":"boolean","default":false,"description":"Return the final state of all variables in a dense object"},"returnVariablesExpanded":{"type":"boolean","default":false,"description":"Return the final state of all variables in the same format as the input params"}},"description":"Optional object for runtime override of Seek options."}}}}}},"responses":{"200":{"description":"Answer response","content":{"text/event-stream":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/seek_response"}}}}}}},"security":[{"apiKey":[]},{"embedcode":[]}]}},"/neuralEdit":{"post":{"tags":["NeuralEdit"],"summary":"Stream neuralEdit response","description":"Runs neuralEdit flow and returns SSE output.","operationId":"neuralEdit","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["instructions"],"properties":{"instructions":{"type":"string","description":"Edit or question instructions for neuralEdit."},"agent":{"type":"string","description":"Optional neuralEdit category/agent selector."},"templateName":{"type":"string","description":"Optional explicit template/agent name."},"selectedText":{"type":"string","description":"The selected text chunk to edit/question."},"fullText":{"type":"string","description":"Full document text."},"history":{"type":"string","description":"Prior neuralEdit history."},"contextFiles":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"filename":{"type":"string"},"description":{"type":"string"}}}}],"description":"Context files as JSON string or array."},"options":{"type":"object","description":"Optional overrides."}}}}}},"responses":{"200":{"description":"SSE response","content":{"text/event-stream":{"schema":{"type":"string"}}}},"401":{"description":"Unauthorized"},"500":{"description":"Server error"}},"security":[{"apiKey":[]},{"embedcode":[]}]}},"/rate":{"post":{"tags":["Seek Answer Ratings"],"summary":"Rate an answer","description":"Allow users to give feedback in on answers generated","operationId":"rate","requestBody":{"description":"The request object.","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"answerId":{"type":"integer","description":"The answer id"},"score":{"type":"integer","minimum":0,"maximum":5,"description":"The rating score. An integer, 0-5. 0 is worst, 5 is best. For Thumbs up / Thumbs down send 0 or 5"},"feedback":{"type":"string","description":"text feedback on the answer"}}}}}},"responses":{"200":{"description":"Success"}},"security":[{"apiKey":[]}]}},"/answerRatings":{"post":{"tags":["Seek Answer Ratings"],"summary":"Get the average user ratings for an answer","description":"Get the average user ratings for an answer","operationId":"answerRatings","requestBody":{"description":"The request object.","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"answerId":{"type":"integer","description":"The answer id"},"number":{"type":"integer","description":"The number of previous user ratings to average. Leave blank to average all ratings."}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"score":{"type":"number","description":"The average score for the answer.","minimum":0,"maximum":5},"total":{"type":"number","description":"The total number of user ratings for the answer."},"feedback":{"type":"string","description":"User feedback"}}}}}}},"security":[{"apiKey":[]}]}},"/maistro":{"post":{"tags":["mAIstro"],"summary":"Run mAistro NTL or agent","description":"Freeform prompting using NeuralSeek Template Language or a saved agent","operationId":"maistro","parameters":[{"in":"query","name":"overrideschema","schema":{"type":"string","default":""},"required":false,"description":"Find variables based on post body. Return all variables as the base presponse body, overriding the normal NS schema. All POST options will be ignored. Set this to a string value of 'true' to activate"},{"in":"query","name":"overrideagent","schema":{"type":"string","default":""},"required":false,"description":"If using overrideSchema you must pass your agent name here. All other POST options will be ignored."},{"in":"query","name":"debug","schema":{"type":"string","default":""},"required":false,"description":"Include NS debug information in a field named 'neuralseek'. Set this to a string value of 'true' to activate"}],"requestBody":{"description":"The request object.","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ntl":{"type":"string","default":"","description":"The NTL script to evaluate. Include either this or agent - not both"},"agent":{"type":"string","default":"","description":"The agent to use. Include either this or NTL"},"params":{"type":"array","description":"An array of parameters to use in evaluation of the NTL","items":{"type":"object","properties":{"name":{"type":"string","default":"","description":"The parameter name"},"value":{"type":"string","default":"","description":"The parameter value"}}}},"options":{"type":"object","description":"Override options","properties":{"streaming":{"type":"boolean","default":false,"description":"Return the response via SSE streaming. This is not compatible with most Virtual Agent platforms, and is intentded for direct website use."},"llm":{"type":"string","default":"","description":"Override the LLM load balancer and force seek to use a specific LLM. Input the LLM code here. You must have a valid model card set up on the configure tab for the code you input."},"user_id":{"type":"string","default":"","description":"Set the user_id. Useful and required if you have a corporate document filter set"},"timeout":{"type":"number","minimum":1,"maximum":600000,"description":"Timeout in miliseconds. (optional)"},"temperatureMod":{"type":"number","minimum":-1,"maximum":1,"description":"Shift the model's baseline temperature weighting by a percentage"},"toppMod":{"type":"number","minimum":-1,"maximum":1,"description":"Shift the model's baseline probability weighting by a percentage"},"freqpenaltyMod":{"type":"number","minimum":-1,"maximum":1,"description":"Shift the model's baseline frequency penalty weighting by a percentage"},"minTokens":{"type":"number","minimum":0,"description":"Set the minimum tokens you want the model to produce"},"maxTokens":{"type":"number","minimum":1,"description":"Set the maximum tokens you want the model to produce"},"lastTurn":{"type":"array","description":"lastTurn is a flexible object. It is backwards compatible with the original single turn object, as well as compatible with the Watson Assistant session history format.","items":{"type":"object","properties":{"input":{"type":"string","default":"","description":"The user input"},"response":{"type":"string","default":"","description":"The system response. Text strings only here. "}}}},"returnVariables":{"type":"boolean","default":false,"description":"Return the final state of all variables in a dense object"},"returnVariablesExpanded":{"type":"boolean","default":false,"description":"Return the final state of all variables in the same format as the input params"},"returnRender":{"type":"boolean","default":false,"description":"Return the midstate renders"},"returnSource":{"type":"boolean","default":false,"description":"Return the source parts"},"maxRecursion":{"type":"integer","minimum":0,"maximum":1000,"default":10,"description":"The maximum number of recursive calls to Explore. Use caution that you have not created an endless loop as you increase the maximum, as each Explore is charged."}}}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"answer":{"type":"string","default":"","description":"The generated response"},"sourceParts":{"type":"array","items":{"type":"string","default":""}},"render":{"type":"array","description":"The steps used to render the result.","items":{"type":"object","properties":{"node":{"type":"string","default":"","description":"The node type"},"vars":{"type":"object","description":"The variable values"},"out":{"type":"string","default":"","description":"The output"},"chained":{"type":"boolean","description":"True if the step is chained"}}}},"variables":{"type":"object","description":"The returned variable."},"variablesExpanded":{"type":"array","description":"The returned variable, in the format of the input params","items":{"type":"object","properties":{"name":{"type":"string","default":"","description":"The variable name"},"value":{"type":"string","default":"","description":"The variable value"}}}}}}}}}},"security":[{"apiKey":[]},{"embedcode":[]}]}},"/maistro/{agent}":{"get":{"tags":["mAIstro"],"summary":"Run a mAIstro agent via GET","description":"Run a mAIstro agent via GET","parameters":[{"in":"query","name":"params","style":"simple","description":"Pass your mAIstro params as query parameters in simple name=value format","allowReserved":true,"schema":{"type":"string"}},{"in":"path","name":"agent","required":true,"description":"The saved mAIstro agent to run","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"answer":{"type":"string","default":"","description":"The generated response"},"sourceParts":{"type":"array","items":{"type":"string","default":""}},"render":{"type":"array","description":"The steps used to render the result.","items":{"type":"object","properties":{"node":{"type":"string","default":"","description":"The node type"},"vars":{"type":"object","description":"The variable values"},"out":{"type":"string","default":"","description":"The output"},"chained":{"type":"boolean","description":"True if the step is chained"}}}},"variables":{"type":"object","description":"The returned variable."},"variablesExpanded":{"type":"array","description":"The returned variable, in the format of the input params","items":{"type":"object","properties":{"name":{"type":"string","default":"","description":"The variable name"},"value":{"type":"string","default":"","description":"The variable value"}}}}}}}}},"202":{"description":"Server still processing"}},"security":[{"apiKey":[]}]}},"/maistro_stream":{"post":{"tags":["mAIstro"],"summary":"Stream mAIstro NTL or an agent","description":"Freeform prompting using NeuralSeek Template Language or a saved agent","operationId":"maistro_stream","requestBody":{"description":"The request object.","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ntl":{"type":"string","default":"","description":"The NTL script to evaluate. Include either this or agent - not both"},"agent":{"type":"string","default":"","description":"The agent to use. Include either this or NTL"},"params":{"type":"array","description":"An array of parameters to use in evaluation of the NTL","items":{"type":"object","properties":{"name":{"type":"string","default":"","description":"The parameter name"},"value":{"type":"string","default":"","description":"The parameter value"}}}},"options":{"type":"object","description":"Override options","properties":{"llm":{"type":"string","default":"","description":"Override the LLM load balancer and force seek to use a specific LLM. Input the LLM code here. You must have a valid model card set up on the configure tab for the code you input."},"user_id":{"type":"string","default":"","description":"Set the user_id. Useful and required if you have a corporate document filter set"},"timeout":{"type":"number","minimum":1,"maximum":600000,"description":"Timeout in miliseconds. (optional)"},"temperatureMod":{"type":"number","minimum":-1,"maximum":1,"description":"Shift the model's baseline temperature weighting by a percentage"},"toppMod":{"type":"number","minimum":-1,"maximum":1,"description":"Shift the model's baseline probability weighting by a percentage"},"freqpenaltyMod":{"type":"number","minimum":-1,"maximum":1,"description":"Shift the model's baseline frequency penalty weighting by a percentage"},"minTokens":{"type":"number","minimum":0,"description":"Set the minimum tokens you want the model to produce"},"maxTokens":{"type":"number","minimum":1,"description":"Set the maximum tokens you want the model to produce"},"lastTurn":{"type":"array","description":"lastTurn is a flexible object. It is backwards compatible with the original single turn object, as well as compatible with the Watson Assistant session history format.","items":{"type":"object","properties":{"input":{"type":"string","default":"","description":"The user input"},"response":{"type":"string","default":"","description":"The system response. Text strings only here. "}}}},"returnVariables":{"type":"boolean","default":false,"description":"Return the final state of all variables in a dense object"},"returnVariablesExpanded":{"type":"boolean","default":false,"description":"Return the final state of all variables in the same format as the input params"},"returnRender":{"type":"boolean","default":false,"description":"Return the midstate renders"},"returnSource":{"type":"boolean","default":false,"description":"Return the source parts"},"maxRecursion":{"type":"integer","minimum":0,"maximum":1000,"default":10,"description":"The maximum number of recursive calls to Explore. Use caution that you have not created an endless loop as you increase the maximum, as each Explore is charged."}}}}}}}},"responses":{"200":{"description":"Success","content":{"text/event-stream":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"object","properties":{"answer":{"type":"string","default":"","description":"The generated response"},"sourceParts":{"type":"array","items":{"type":"string","default":""}},"render":{"type":"array","description":"The steps used to render the result.","items":{"type":"object","properties":{"node":{"type":"string","default":"","description":"The node type"},"vars":{"type":"object","description":"The variable values"},"out":{"type":"string","default":"","description":"The output"},"chained":{"type":"boolean","description":"True if the step is chained"}}}},"variables":{"type":"object","description":"The returned variable."},"variablesExpanded":{"type":"array","description":"The returned variable, in the format of the input params","items":{"type":"object","properties":{"name":{"type":"string","default":"","description":"The variable name"},"value":{"type":"string","default":"","description":"The variable value"}}}}}}}}}}}},"security":[{"apiKey":[]},{"embedcode":[]}]}},"/maistro_batch":{"post":{"tags":["mAIstro"],"summary":"Call mAIstro NTL or an agent via batch","description":"Freeform prompting using NeuralSeek Template Language or a saved agent run in batch mode","operationId":"maistro_batch","requestBody":{"description":"The request object.","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ntl":{"type":"string","default":"","description":"The NTL script to evaluate. Include either this or agent - not both"},"agent":{"type":"string","default":"","description":"The agent to use. Include either this or NTL"},"params":{"type":"array","description":"An array of parameters to use in evaluation of the NTL","items":{"type":"object","properties":{"name":{"type":"string","default":"","description":"The parameter name"},"value":{"type":"string","default":"","description":"The parameter value"}}}},"options":{"type":"object","description":"Override options","properties":{"llm":{"type":"string","default":"","description":"Override the LLM load balancer and force seek to use a specific LLM. Input the LLM code here. You must have a valid model card set up on the configure tab for the code you input."},"user_id":{"type":"string","default":"","description":"Set the user_id. Useful and required if you have a corporate document filter set"},"timeout":{"type":"number","minimum":1,"maximum":600000,"description":"Timeout in miliseconds. (optional)"},"temperatureMod":{"type":"number","minimum":-1,"maximum":1,"description":"Shift the model's baseline temperature weighting by a percentage"},"toppMod":{"type":"number","minimum":-1,"maximum":1,"description":"Shift the model's baseline probability weighting by a percentage"},"freqpenaltyMod":{"type":"number","minimum":-1,"maximum":1,"description":"Shift the model's baseline frequency penalty weighting by a percentage"},"minTokens":{"type":"number","minimum":0,"description":"Set the minimum tokens you want the model to produce"},"maxTokens":{"type":"number","minimum":1,"description":"Set the maximum tokens you want the model to produce"},"lastTurn":{"type":"array","description":"lastTurn is a flexible object. It is backwards compatible with the original single turn object, as well as compatible with the Watson Assistant session history format.","items":{"type":"object","properties":{"input":{"type":"string","default":"","description":"The user input"},"response":{"type":"string","default":"","description":"The system response. Text strings only here. "}}}},"returnVariables":{"type":"boolean","default":false,"description":"Return the final state of all variables in a dense object"},"returnVariablesExpanded":{"type":"boolean","default":false,"description":"Return the final state of all variables in the same format as the input params"},"returnRender":{"type":"boolean","default":false,"description":"Return the midstate renders"},"returnSource":{"type":"boolean","default":false,"description":"Return the source parts"},"maxRecursion":{"type":"integer","minimum":0,"maximum":1000,"default":10,"description":"The maximum number of recursive calls to Explore. Use caution that you have not created an endless loop as you increase the maximum, as each Explore is charged."}}}}}}}},"responses":{"200":{"description":"Job Submitted"}},"security":[{"apiKey":[]}]},"get":{"tags":["mAIstro"],"summary":"Get mAIstro batch results","description":"Retrieve results from a mAIstro batch run","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"answer":{"type":"string","default":"","description":"The generated response"},"sourceParts":{"type":"array","items":{"type":"string","default":""}},"render":{"type":"array","description":"The steps used to render the result.","items":{"type":"object","properties":{"node":{"type":"string","default":"","description":"The node type"},"vars":{"type":"object","description":"The variable values"},"out":{"type":"string","default":"","description":"The output"},"chained":{"type":"boolean","description":"True if the step is chained"}}}},"variables":{"type":"object","description":"The returned variable."},"variablesExpanded":{"type":"array","description":"The returned variable, in the format of the input params","items":{"type":"object","properties":{"name":{"type":"string","default":"","description":"The variable name"},"value":{"type":"string","default":"","description":"The variable value"}}}}}}}}},"202":{"description":"Server still processing"}},"security":[{"apiKey":[]}]},"delete":{"tags":["mAIstro"],"summary":"Cancel current mAIstro batch run","description":"Cancel current mAIstro batch run","responses":{"200":{"description":"Success"}},"security":[{"apiKey":[]}]}},"/chat/completions":{"post":{"summary":"Chat Completions - compatible mAIStro endpoint","description":"Call a mAIstro agent using the openAI chat completions schema.","parameters":[{"name":"runid","in":"header","required":false,"schema":{"type":"string"},"description":"Optional header to specify the run ID"}],"tags":["mAIstro"],"operationId":"chat","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"model":{"type":"string","description":"The mAIstro agent to call"},"messages":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["user","assistant","system","tool"],"description":"The role of the message sender"},"content":{"type":"string","description":"The content of the message"}}}},"tools":{"type":"object","properties":{"type":{"type":"string","enum":["agent"],"description":"The type of tool to call. Only \"agent\" is valid"},"params":{"type":"array","description":"An array of parameters to use when calling the mAIstro agent\"","items":{"type":"object","properties":{"name":{"type":"string","default":"","description":"The parameter name"},"value":{"type":"string","default":"","description":"The parameter value"}}}}}},"stream":{"type":"boolean","description":"Whether to stream responses as server-sent events"}},"required":["model"]}}}},"security":[{"apiKey":[]}],"responses":{"200":{"description":"Chat completion response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the completion"},"object":{"type":"string","description":"The type of object returned, should be 'chat.completion'"},"created":{"type":"integer","description":"Timestamp of when the completion was created"},"model":{"type":"string","description":"The model used for generating the completion"},"choices":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","description":"The index of the choice"},"message":{"type":"object","properties":{"role":{"type":"string","enum":["user","assistant"],"description":"The role of the message sender"},"content":{"type":"string","description":"The content of the message"}}},"finish_reason":{"type":"string","description":"The reason the message generation finished"}}}}}}},"text/event-stream":{"schema":{"type":"string","example":"event: thread.message.delta\ndata: {\"id\": \"run-8c1182\", \"object\": \"thread.message.delta\", \"thread_id\": \"c91e2e38-7b42-43d7-b913-0273951350a9\", \"model\": \"agent-02\", \"created\": 1728566547, \"choices\": [{\"delta\": {\"role\": \"assistant\", \"content\": \"Here are the upcoming holidays in the US:\\n\\n- National Coming Out Day: October 11, 2024\\n- Yom Kippur: October 12, 2024\\n- Columbus Day: October 14, 2024\\n- Sukkot: October 17, 2024\\n- Sweetest Day: October 19, 2024\\n- National Cat Day: October 29, 2024\\n- Halloween: October 31, 2024\\n- Diwali: November 01, 2024\\n\\nSource:\\n- [Holidays Calendar](https://www.holidayscalendar.com/countries/united-states/)\\n- [Time and Date](https://www.timeanddate.com/holidays/us/)\\n- [Federal Holidays](https://www.federalholidays.net/usa/federal-holidays-2024.html)\\n- [Dayspedia](https://dayspedia.com/us/calendar/holidays/)\"}}]}\n\nevent: thread.run.step.delta\ndata: {\"id\": \"step-d08460\", \"object\": \"thread.run.step.delta\", \"thread_id\": \"c91e2e38-7b42-43d7-b913-0273951350a9\", \"model\": \"agent-02/mistralai/mistral-large-latest\", \"created\": 1728566531, \"choices\": [{\"delta\": {\"role\": \"assistant\", \"step_details\": {\"type\": \"thinking\", \"content\": \"The agent's response is a generic greeting and does not address the user's specific question about upcoming holidays in the US. I should use the available tools to find the relevant information and provide a more specific and helpful response.\"}}]}\n\nevent: thread.run.step.delta\ndata: {\"id\": \"step-a0844e\", \"object\": \"thread.run.step.delta\", \"thread_id\": \"c91e2e38-7b42-43d7-b913-0273951350a9\", \"model\": \"agent-02/mistralai/mistral-large-latest\", \"created\": 1728566532, \"choices\": [{\"delta\": {\"role\": \"assistant\", \"step_details\": {\"type\": \"tool_calls\", \"tool_calls\": [{\"name\": \"find_employee_by_name\", \"args\": {\"name\": \"vsingh\"}, \"id\": \"e32ff32a4\"}]}}]}\n\nevent: thread.run.step.delta\ndata: {\"id\": \"step-03050c\", \"object\": \"thread.run.step.delta\", \"thread_id\": \"ae1b353f-65b9-4668-b1e8-9298979c9697\", \"model\": \"agent-02\", \"created\": 1729091694, \"choices\": [{\"delta\": {\"role\": \"assistant\", \"step_details\": {\"type\": \"tool_response\", \"content\": \"[{'cellPhone': None, 'city': None, 'country': 'India', 'dateOfBirth': datetime.date(1998, 6, 30), 'defaultFullName': 'Vijaya Singh', 'department': 'HR Total Rewards (5000145)', 'email': 'kota.manaswini@partner.ibm.com', 'firstName': 'Vijaya', 'gender': ' ', 'hireDate': datetime.date(2023, 6, 30), 'lastName': 'Singh', 'salary': None, 'state': None, 'title': 'Digital Consultant', 'userId': '103451', 'businessPhone': None, 'location': 'Hyderabad (6200-0005)'}]\", \"name\": \"find_employee_by_name\", \"tool_call_id\": \"e32ff32a4\"}}}]}\n"}}}}}}},"/maistroRate":{"post":{"tags":["mAIstro Agent Ratings"],"summary":"Rate an Agent","description":"Allow users to give feedback on an Agent run","operationId":"maistroRate","requestBody":{"description":"The request object.","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agent":{"type":"string","description":"The Agent"},"runId":{"type":"number","description":"The runId"},"score":{"type":"integer","minimum":0,"maximum":5,"description":"The rating score. An integer, 0-5. 0 is worst, 5 is best. For Thumbs up / Thumbs down send 0 or 5"},"feedback":{"type":"string","description":"text feedback on the answer"}}}}}},"responses":{"200":{"description":"Success"}},"security":[{"apiKey":[]}]}},"/maistroRatings":{"post":{"tags":["mAIstro Agent Ratings"],"summary":"Get the average user ratings for an agent","description":"Get the average user ratings for an agent","operationId":"maistroRatings","requestBody":{"description":"The request object.","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agent":{"type":"string","description":"The agent"},"number":{"type":"integer","description":"The number of previous user ratings to average. Leave blank to average all ratings."}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"score":{"type":"number","description":"The average score for the answer.","minimum":0,"maximum":5},"total":{"type":"number","description":"The total number of user ratings for the answer."},"feedback":{"type":"string","description":"User feedback"}}}}}}},"security":[{"apiKey":[]}]}},"/categorize":{"post":{"tags":["Categorize"],"summary":"Categorize text into an Intent & Category","description":"Categorize text into an Intent & Category","operationId":"categorize","requestBody":{"description":"The request object.","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"question":{"type":"string","default":"","description":"The text to categorize"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"intent":{"type":"string","default":"","description":"The matched Intent"},"category":{"type":"string","default":"","description":"The matched Category"},"categoryId":{"type":"integer","description":"The Category id"},"topIntents":{"type":"object","description":"If Vector Similarity is set as the Intent Match type, this will provide the top 3 matches","properties":{"score":{"type":"number","description":"The score of the intent"},"intent":{"type":"string","default":"","description":"The intent name"}}}}}}}}},"security":[{"apiKey":[]}]}},"/extract":{"post":{"tags":["Extract Entities"],"summary":"Extract entitites from text","description":"Extract entitites from text","operationId":"ExtractEntities","requestBody":{"description":"The request object.","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","description":"The text to extract entitites from"},"language":{"type":"string","description":"The 2-char language code to be used when generating a promptEntity response. Only set this if you want to override the configured language in NeuralSeek."},"entities":{"type":"string","example":"[{\"name\":\"dog-breeds\",\"description\":\"Types of Dogs\", \"format\":\"string\"}]","description":"An array of objects, stringified. The properties of the object are name, description, and format"},"slots":{"type":"object","description":"Provide an object of variable names, with a type property set to an entity type to match to in total across multiple turns of a conversation. NeuralSeek will return a promptEntity to display to the user to continue to fil the slots. As slots are filled the value field will be populated. Continue to send this entire filed back as input thru the multiple turns of the conversation, untill Complete is set to true. Complete will be set to true when all slots are filled","example":"{\"zip\": {\"type\": \"zip-code\", \"description\":\"The user's zip code\", \"value\": \"\"}, \"statenm\": {\"type\": \"geo-state\", \"description\":\"The state you are traveling to\", \"value\": \"\"}}"},"confirmSlots":{"type":"boolean","description":"When using Slots, once all slots have been filled display a summary and ask for a confirmation before setting the 'complete' flag"},"confirmEverySlot":{"type":"boolean","description":"When using Slots, on every turn recite the slot that was just previously filled."}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"extractedEntities":{"type":"array","items":{"type":"object","properties":{"entity":{"type":"string","default":"","description":"The found entity"}}}},"complete":{"type":"boolean","default":false,"description":"If slots are passed, complete will be set to true when all slots are filled"},"promptEntity":{"type":"string","description":"A message to display to the user asking them to provide input for the next group of unfilled slots."},"slots":{"type":"object","description":"If the slots parameter is filled on the input, NeuralSeek will return it and begin filling the value fields. Continue to send this entire filed back as input thru the multiple turns of the conversation, untill Complete is set to true. Complete will be set to true when all slots are filled","example":"{\"zip\": {\"type\": \"zip-code\", \"description\":\"The user's zip code\", \"value\": \"06111\"}, \"statenm\": {\"type\": \"geo-state\", \"description\":\"The state you are traveling to\", \"value\": \"\"}}"}}}}}}},"security":[{"apiKey":[]}]}},"/translate":{"post":{"tags":["Translate"],"summary":"Translate text into a desired language","description":"Translate text into a desired language","operationId":"Translate","requestBody":{"description":"The request object.","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"array","description":"An array of input text to be translated","items":{"type":"string"},"default":""},"model_id":{"type":"string","default":"","description":"Convienence input for legacy connections. Define a traget language by setting a source to target relationship using 2-digit language codes, for example en-es to translate into spanish. The source language is ignored. Either this or the target parameter is required."},"target":{"type":"string","default":"","description":"The 2-digit language code for the target language. Either this or the model_id parameter is required. Valid values are: ab, aa, af, ak, sq, am, ar, an, hy, as, av, ae, ay, az, bm, ba, eu, be, bn, bh, bi, bs, pt-br, br, bg, my, ca, km, ch, ce, ny, zh, zh-cn, zh-tw, cu, cv, kw, co, cr, hr, cs, da, dv, nl, dz, en, eo, et, ee, fo, fj, fi, fr, ff, gd, gl, lg, ka, de, el, gn, gu, ht, ha, he, hz, hi, ho, hu, is, io, ig, id, ia, ie, iu, ik, ga, it, ja, jv, kl, kn, kr, ks, kk, ki, rw, ky, kv, kg, ko, kj, ku, lo, la, lv, li, ln, lt, lu, lb, mk, mg, ms, ml, mt, gv, mi, mr, mh, mn, na, nv, nd, nr, ng, ne, se, nn, no, nb, oc, oj, or, om, os, pi, pa, fa, pl, pt, ps, qu, ro, rm, rn, ru, sm, sg, sa, sc, sr, sn, ii, sd, si, sk, sl, so, st, es, su, sw, ss, sv, tl, ty, tg, ta, tt, te, th, bo, ti, to, ts, tn, tr, tk, tw, ug, uk, ur, uz, ve, vi, vo, wa, cy, fy, wo, xh, yi, yo, za, zu"},"llmId":{"type":"string","default":"","description":"Optional - Pass an llm card id to override the LLM used for translation"},"maxChunk":{"type":"integer","description":"Optional - Pass a maximum translation chunk token size. This can help speed up translations in the 200-2000 word range when using slower LLM's. Use a setting between 200 and 500 in these scenarios. Setting 0 or omitting this parameter unsets it.","default":0},"additionalInstructions":{"type":"string","default":"","description":"Optional - Additional prompting to be passed to the LLM. Do not casusally use this field, you will break things."}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"word_count":{"type":"integer","description":"The word count."},"character_count":{"type":"integer","description":"The word count."},"detected_language":{"type":"string","default":"","description":"The 2-digit language code for the detected language."},"detected_language_confidence":{"type":"number","description":"The detected language confidence."},"translation_glossary":{"type":"boolean","description":"Returns true if a glossary is loaded and matched any input."},"translation_glossary_exact":{"type":"boolean","description":"Returns true if a glossary is loaded and an entry exactly matched the input."},"translations":{"type":"array","items":{"type":"object","properties":{"translation":{"type":"string","default":"","description":"The translation"}}}}}}}}}},"security":[{"apiKey":[]}]}},"/translateGlossary":{"post":{"tags":["Translate"],"summary":"Add custom translations","description":"Add custom translations","operationId":"translateGlossary","requestBody":{"description":"This endpoint will accept either a file upload (TMX or JSON), or a direct JSON payload following IBM's JSON file format https://cloud.ibm.com/docs/language-translator?topic=language-translator-customizing#json. Only one file may be saved. Subsequent files will overwrite.","required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","default":"","format":"binary"}}}},"application/json":{"schema":{"type":"object","properties":{"sentences":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"language":{"type":"string","default":"","description":"The language code"},"sentence":{"type":"string","default":"","description":"The sentence fragment"}}}},"description":"Instead of a file upload you may pass sentence mappings"}}}}}},"responses":{"200":{"description":"Success"}},"security":[{"apiKey":[]}]},"delete":{"tags":["Translate"],"summary":"Delete the custom translations","description":"Delete the custom translations","operationId":"deleteTranslateGlossary","responses":{"200":{"description":"Success"}},"security":[{"apiKey":[]}]}},"/identify":{"post":{"tags":["Translate"],"summary":"Identify the source language","description":"Identify the source language","operationId":"IdentifyLanguage","requestBody":{"description":"The request object.","required":true,"content":{"text/plain":{"schema":{"type":"string","default":"","description":"The input text to identify the language of"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"language":{"type":"string","default":"","description":"The 2-character language code of the identified language."},"confidence":{"type":"number","description":"The confidence of the language identification."}}}}}}}},"security":[{"apiKey":[]}]}},"/identify-single":{"post":{"tags":["Translate"],"summary":"Identify the source language (JSON)","description":"Identify the source language (JSON)","operationId":"IdentifyLanguageJSON","requestBody":{"description":"The request object.","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"string","default":"","description":"The input text to identify the language of"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"language":{"type":"string","default":"","description":"The 2-character language code of the identified language."},"confidence":{"type":"number","description":"The confidence of the language identification"}}}}}}},"security":[{"apiKey":[]}]}},"/pii":{"post":{"tags":["Guardrails"],"summary":"Find PII in a user utterance","description":"Find PII in a user utterance","operationId":"pii","requestBody":{"description":"The request object.","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","default":"","description":"The user utterance to check for PII"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"pii":{"type":"array","description":"An array of found PII","items":{"type":"string"}}},"default":""}}}}}},"security":[{"apiKey":[]}]}},"/score":{"post":{"tags":["Guardrails"],"summary":"Run the Semantic Scoring model on text against an array of passages","description":"Run the Semantic Scoring model on text against an array of passages","operationId":"score","requestBody":{"description":"The request object. Must include the question and a context.","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","default":"","description":"The text to score"},"passages":{"type":"array","description":"The rating score. An integer, 0-5. 0 is worst, 5 is best. For Thumbs up / Thumbs down send 0 or 5","items":{"type":"string"},"default":""}}}}}},"responses":{"200":{"description":"Success"}},"security":[{"apiKey":[]}]}},"/train":{"post":{"tags":["Train KB"],"summary":"Submit KnowledgeBase Training","description":"Submit KnowledgeBase Training","operationId":"train","requestBody":{"description":"The request object. Must include the question and a context.","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"train":{"type":"string","default":"","description":"The training token. Get this from passages/train"},"score":{"type":"integer","minimum":0,"maximum":100,"description":"The relevancy score. An integer, 0-100"}}}}}},"responses":{"200":{"description":"Success"}},"security":[{"apiKey":[]}]}},"/test":{"get":{"tags":["Service Test"],"summary":"Service check","description":"Responds 200","operationId":"servicetest","responses":{"200":{"description":"Success"}}},"post":{"tags":["Test Questions"],"summary":"Test questions via batch upload","description":"Test questions via batch upload","operationId":"test","requestBody":{"description":"The questions csv. Must adhere to the template https://api.neuralseek.com/q.csv After upload you will receive a 202 response and the server will begin processing. Check for your completed results on the getTestResults endpoint.","content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","default":"","format":"binary"}}}},"application/json":{"schema":{"type":"object","properties":{"proposalID":{"type":"string","default":"","description":"An optional Proposal ID to use for the test"}}}}}},"responses":{"200":{"description":"Success"}},"security":[{"apiKey":[]}]}},"/getTestResults":{"get":{"tags":["Test Questions"],"summary":"Get Test Results","description":"Retrieve an results from the test endpoint","operationId":"getTestResults","responses":{"200":{"description":"Your results CSV"},"202":{"description":"Server still processing"}},"security":[{"apiKey":[]}]}},"/analytics":{"post":{"tags":["Analytics"],"summary":"Instance Analytics","description":"Retrieve an analytics dataset for your instance","operationId":"analytics","requestBody":{"description":"The request object. You may optionally limit the result set using \"count\"","required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer","description":"The number of rows to return"}}}}}},"responses":{"200":{"description":"Success"}},"security":[{"apiKey":[]}]}},"/logs":{"post":{"tags":["Logs"],"summary":"Instance Logs","description":"Retrieve logs for your instance","operationId":"logs","requestBody":{"description":"The request object.","required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"type":"integer","default":100,"minimum":1,"maximum":100,"description":"The number of rows to return, max of 100"},"skip":{"type":"integer","default":0,"minimum":0,"description":"The number of result sets to skip for paging"},"search":{"type":"string","default":"","description":"An optional search string"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","default":"","description":"The timestamp of the entry"},"question":{"type":"string","default":"","description":"The user question"},"answer":{"type":"string","default":"","description":"The answer returned"},"id":{"type":"integer","description":"The answer id"}}}}}}}},"security":[{"apiKey":[]}]}},"/logExternalAgent":{"post":{"tags":["Logs"],"summary":"Log external agent execution details","description":"Records various timing and performance metrics for external agent execution","operationId":"logExternalAgent","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["runId","user","templateName","resultsLink","entries"],"properties":{"runId":{"type":"number","description":"Unique numeric identifier for the execution run"},"templateName":{"type":"string","description":"Name of the Agent being executed"},"user":{"type":"string","description":"User identifier who initiated the execution"},"time":{"type":"number","description":"The total time of the Agent run in ms"},"resultsLink":{"type":"string","description":"Link to detailed execution results"},"entries":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["LLMTime","LLMCacheTime","KBTime","ElementTime"]},"llmtime":{"type":"number","description":"The LLM time in ms"},"inputtokencount":{"type":"integer","description":"Number of input tokens"},"generatedtokencount":{"type":"integer","description":"Number of generated tokens"},"llm":{"type":"string","description":"LLM model identifier"},"llmcode":{"type":"string","description":"LLM specific code"},"kbtime":{"type":"number","format":"float","description":"Knowledge base processing time in ms"},"kb":{"type":"string","description":"Knowledge base identifier"},"kbScore":{"type":"number","format":"float","description":"Knowledge base relevance score"},"kbCoverage":{"type":"number","format":"float","description":"Knowledge base coverage percentage"},"elementTime":{"type":"number","format":"float","description":"Time taken for element processing in ms"},"element":{"type":"string","enum":["model","rest","database"],"description":"Type of element being timed"}}}}}}}}},"responses":{"200":{"description":"Successfully logged external agent execution","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}}}}}},"400":{"description":"Invalid request payload"},"500":{"description":"Internal server error"}},"security":[{"apiKey":[]}]}},"/otp":{"post":{"tags":["Keys"],"summary":"Create a One Time Password","description":"Create a One Time Password for use instead of an api key in unsecure environments, such as the browser. The password will expire after one use, and is valid for 30 minutes. This password can only be used for seek, mAIstro, extract, categorize, score, and logs operations.","operationId":"otp","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"otp":{"type":"string","default":"","description":"The one time password"}}}}}}},"security":[{"apiKey":[]}]}},"/user_data":{"delete":{"tags":["User Data"],"summary":"Delete all user data","description":"This endpoint deletes all user data","operationId":"deleteUserData","parameters":[{"in":"query","name":"intent","description":"The intents to delete. If left blank all intents will be deleted.","schema":{"type":"array","items":{"type":"string","default":""}}}],"responses":{"200":{"description":"Success"}},"security":[{"apiKey":[]}]}},"/keycheck":{"post":{"tags":["Keys"],"summary":"Validate an api key","description":"Validate an api key","operationId":"keycheck","responses":{"200":{"description":"Success"}},"security":[{"apiKey":[]}]}}},"components":{"securitySchemes":{"apiKey":{"type":"apiKey","name":"apikey","in":"header"},"embedcode":{"type":"apiKey","name":"embedcode","in":"header"}},"schemas":{"seek":{"type":"object","required":["question"],"properties":{"question":{"type":"string","default":"","description":"The user's question for NeuralSeek"},"user_session":{"type":"object","properties":{"metadata":{"type":"object","properties":{"user_id":{"type":"string","default":"","description":"A unique user identifier."}}},"system":{"type":"object","properties":{"session_id":{"type":"string","default":"","description":"A session identifier for the defined user."}}}},"description":"Context tracking object. You must set at least one of user_id or session_id to enable context keeping."},"params":{"type":"array","description":"An array of parameters to use in evaluation of the seek when calling mAIstro during a seek.","items":{"type":"object","properties":{"name":{"type":"string","default":"","description":"The parameter name"},"value":{"type":"string","default":"","description":"The parameter value"}}}},"options":{"type":"object","properties":{"personalize":{"type":"object","description":"An object that allows NeuralSeek to tailor a response for a specific user","properties":{"preferredName":{"type":"string","default":"","description":"The name the user should be referred to by"},"noWelcome":{"type":"string","default":"","description":"The user has already been welcomed, do not re-welcome. Valid value is 'true' or 'false'. Default value is 'false'."},"forceFirstPerson":{"type":"string","default":"","description":"Use a first-person speaking style, even if no preferredName is set. Valid value is 'true' or 'false'. Default value is 'false'."},"products":{"type":"array","description":"An array of products this customer currently consumes from your company","items":{"type":"string"}},"additionalDetails":{"type":"string","default":"","description":"Additional details to pass to language generation"}}},"proposalID":{"type":"string","default":"","description":"Override all settings by passing a NeuralSeek Proposal ID."},"streaming":{"type":"boolean","default":false,"description":"Return the response via SSE streaming. This is not compatible with most Virtual Agent platforms, and is intentded for direct website use."},"seekLLM":{"type":"string","default":"","description":"Override the LLM load balancer and force seek to use a specific LLM. Input the LLM code here. You must have a valid model card set up on the configure tab for the code you input."},"language":{"type":"string","default":"","description":"Valid values are: xx, ab, aa, af, ak, sq, am, ar, an, hy, as, av, ae, ay, az, bm, ba, eu, be, bn, bh, bi, bs, pt-br, br, bg, my, ca, km, ch, ce, ny, zh, zh-cn, zh-tw, cu, cv, kw, co, cr, hr, cs, da, dv, nl, dz, en, eo, et, ee, fo, fj, fi, fr, ff, gd, gl, lg, ka, de, el, gn, gu, ht, ha, he, hz, hi, ho, hu, is, io, ig, id, ia, ie, iu, ik, ga, it, ja, jv, kl, kn, kr, ks, kk, ki, rw, ky, kv, kg, ko, kj, ku, lo, la, lv, li, ln, lt, lu, lb, mk, mg, ms, ml, mt, gv, mi, mr, mh, mn, na, nv, nd, nr, ng, ne, se, nn, no, nb, oc, oj, or, om, os, pi, pa, fa, pl, pt, ps, qu, ro, rm, rn, ru, sm, sg, sa, sc, sr, sn, ii, sd, si, sk, sl, so, st, es, su, sw, ss, sv, tl, ty, tg, ta, tt, te, th, bo, ti, to, ts, tn, tr, tk, tw, ug, uk, ur, uz, ve, vi, vo, wa, cy, fy, wo, xh, yi, yo, za, zu"},"filter":{"type":"string","default":"","description":"Text to use as a filter against the filter field set in the KnowledgeBase configuration. Use commas to separate multiple strings for an 'or' filter. You can use the filter to isolate a certain subset of documents in the knowledgebase."},"lastTurn":{"type":"array","description":"lastTurn is a flexible object. It is backwards compatible with the original single turn object, as well as compatible with the Watson Assistant session history format.","items":{"type":"object","properties":{"input":{"type":"string","default":"","description":"The user input"},"response":{"type":"string","default":"","description":"The system response. Text strings only here. "}}}},"promptEngineering":{"type":"string","default":"","description":"Enable Prompt engineering. Valid values are the strings 'true' and 'false'"},"promptEngineeringPhrase":{"type":"string","default":"","description":"Prepend a phrase to cleansed user input. Must enable Prompt Engineering inside the NeuralSeek \"Configure\" page"},"answerLength":{"type":"integer","minimum":1,"maximum":4,"description":"The verbosity of the answer. A whole number 1-4"},"url":{"type":"string","default":"","description":"URL of the current page when using with a web-based Virtual Agent"},"stump":{"type":"string","default":"","description":"Stump Speech text. Fallback for when all else fails."},"includeSourceResults":{"type":"boolean","default":false,"description":"Include generation source results. Defaults to false."},"includeHighlights":{"type":"boolean","default":false,"description":"Include highlights from source results. Defaults to false."},"includeSourceResultsFormatted":{"type":"boolean","default":false,"description":"Include generation source results, and output them into a formatted string. Defaults to false."},"sourceResultsNumber":{"type":"integer","default":3,"minimum":1,"maximum":30,"description":"When including source results, how many to include.'"},"sourceResultsSummaryLength":{"type":"integer","default":100,"minimum":0,"maximum":2000,"description":"When including source results, how long of a summary to include.'"},"returnVariables":{"type":"boolean","default":false,"description":"Return the final state of all variables in a dense object"},"returnVariablesExpanded":{"type":"boolean","default":false,"description":"Return the final state of all variables in the same format as the input params"}},"description":"Optional object for runtime override of Seek options."}}},"seek_response":{"type":"object","required":["answer","score"],"properties":{"answer":{"type":"string","default":"","description":"The generated answer"},"ufa":{"type":"string","default":"","description":"The raw answer from the LLM before guardrails are applied."},"answerId":{"type":"string","default":"","description":"The id of the answer. Use this to refer to it from other endpoints, such as the Rating endpoint"},"thumbs":{"type":"string","default":"","description":"The URL of a rating HTML page with an SVG to embed with the answer to allow easy rating."},"thumbsSVG":{"type":"string","default":"","description":"The URL of a rating SVG to display with the answer to allow easy rating."},"intent":{"type":"string","default":"","description":"The intent of the answer."},"category":{"type":"integer","description":"The category id of the answer."},"categoryName":{"type":"string","default":"","description":"The category name of the answer."},"score":{"type":"integer","description":"The final confidence score of the answer (0-100)"},"KBscore":{"type":"integer","description":"The KnowledgeBase confidence of the answer's source documentation (0-100)"},"semanticAnalysis":{"type":"string","default":"","description":"Semantic Analysis"},"cachedResult":{"type":"string","default":"","description":"If the result came from cache, will be set to the string 'true'"},"langCode":{"type":"string","default":"","description":"The language code of the answer. If you set the input language code to 'xx' to identify the language, this is useful to condition of the found language and response."},"url":{"type":"string","default":"","description":"The top scoring URL (if available) used to train the answer. Set the field you want returned here in on the Configure tab. The field must contain a URL, or it will be ignored."},"document":{"type":"string","default":"","description":"The top document (if available) used to train the answer. Set the field you want returned here in on the Configure tab"},"time":{"type":"integer","description":"Total processing time in milliseconds"},"kbTime":{"type":"integer","description":"KnowledgeBase response time in milliseconds"},"protectTime":{"type":"integer","description":"PI time in milliseconds"},"categorySelectionTime":{"type":"integer","description":"Category Selection time in milliseconds"},"promptInjection":{"type":"number","description":"Prompt injection value"},"sourceResultsFormatted":{"type":"string","default":"","description":"A listing of the passages used for answer summarization. This will only return if includeSourceResultsFormatted is set to true on the request"},"passages":{"description":"A listing of the passages used for answer summarization. This will only return if includeSourceResults is set to true on the request","type":"array","items":{"type":"object","properties":{"passage":{"type":"string","default":"","description":"The passage text, summarized to the length set by sourceResultsSummaryLength"},"id":{"type":"string","default":"","description":"The id of the source document in the KB."},"score":{"type":"integer","description":"The score of the passage."},"url":{"type":"string","default":"","description":"The URL (if available) of the source document."},"document":{"type":"string","default":"","description":"The name of the source document."},"train":{"type":"string","default":"","description":"The training token for the document. Use this when calling the /train endpoint."}}}},"kbCoverage":{"type":"integer","description":"KnowledgeBase coverage score. How much content was returned from the KnowledgeBase on the subject asked as compared to benchmarks. Low coverage is not necessarily indicitive of bad content."},"sentiment":{"type":"integer","description":"Sentiment score","minimum":0,"maximum":9},"semanticScore":{"type":"integer","description":"Semantic score (if enabled)","minimum":0,"maximum":100},"variables":{"type":"object","description":"The returned variable."},"variablesExpanded":{"type":"array","description":"The returned variable, in the format of the input params","items":{"type":"object","properties":{"name":{"type":"string","default":"","description":"The variable name"},"value":{"type":"string","default":"","description":"The variable value"}}}}}}}},"externalDocs":{"url":"https://documentation.neuralseek.com","description":"Documentation"}}