{"openapi":"3.0.3","info":{"title":"Keymate.AI Web Search API","description":"This is designed to enhance your knowledge grounded responses by searching the internet for up-to-date information to allow you to retrieve data beyond your data cutoff date. FALLBACK TO /search operation in case of an FUNCTION_INVOCATION_TIMEOUT or 504 or 500 error","version":"1.0.1"},"paths":{"/create_pdf_map":{"post":{"description":"Create a PDF map for the file the user uploaded to the GPT","operationId":"createPDFMap","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"properties":{"openaiFileIdRefs":{"type":"array","items":{"type":"string","description":"List of files to send to BE."}}},"type":"object","required":["openaiFileIdRefs"]}}},"required":true},"responses":{"200":{"description":"Successful response"},"500":{"description":"Unable send file(s)."}}}},"/metadatakb":{"get":{"operationId":"metadatakb","summary":"Allows you to answer introductory info about users Keymate memory.","description":"It brings the metadata about Keymate memory. Shows number of records and a sample record.","parameters":[{"name":"q","in":"query","description":"Set this as '' because it only gives metadata","required":true,"schema":{"type":"string"},"example":"https://keymate.ai"}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"type":"object","properties":{"matches":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"User's unique id with timestamp the data was inserted to long term memory."},"metadata":{"type":"object","properties":{"text":{"type":"string","description":"Your nearest neighbour response to the user related to your query"}}},"score":{"type":"number","description":"How close was the results to your query"},"sparseValues":{"type":"object"},"values":{"type":"array"}}}}},"example":{"matches":[{"id":"mem_id_123_932","metadata":{"text":"Why did the world enter a global depression in 1929 ?"},"score":0.917971551,"sparseValues":{},"values":[]}]}}}}}}}},"/document":{"get":{"operationId":"document","summary":"Allows user to load and use content about specific uploaded document","description":"Use this when you have fileUrl from listpdfs operation or fileName given by user","parameters":[{"name":"q","in":"query","description":"User's related question or information that might be found in the specific pdf file","required":true,"schema":{"type":"string"},"example":"searching for x in the document"},{"name":"fileName","in":"query","description":"fileName of the uploaded pdf by the user provided by user or listpdfs operation","required":true,"schema":{"type":"string"},"example":"something.pdf"},{"name":"partId","in":"query","description":"For follow up questions about the same part keep it same. Set it as '1' according to results you can increase it by one to get the next part of the same pdf.","required":true,"schema":{"type":"string"},"example":"1"}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"type":"object","properties":{"matches":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"User's unique id with timestamp the data was inserted to long term memory."},"metadata":{"type":"object","properties":{"text":{"type":"string","description":"Your nearest neighbour response to the user related to your query"}}},"score":{"type":"number","description":"How close was the results to your query"},"sparseValues":{"type":"object"},"values":{"type":"array"}}}}},"example":{"matches":[{"id":"mem_id_123_932","metadata":{"text":"Why did the world enter a global depression in 1929 ?"},"score":0.917971551,"sparseValues":{},"values":[]}]}}}}}}}},"/pdfpro":{"get":{"operationId":"pdfpro","summary":"Allows user to load and use content about specific uploaded pdf","description":"Use this when you have fileUrl from listpdfs operation or fileName given by user","parameters":[{"name":"q","in":"query","description":"User's related question or information that might be found in the specific pdf file","required":true,"schema":{"type":"string"},"example":"https://keymate.ai"},{"name":"fileName","in":"query","description":"fileName of the uploaded pdf by the user provided by user or listpdfs operation","required":true,"schema":{"type":"string"},"example":"https://keymate.ai"},{"name":"partId","in":"query","description":"For follow up questions about the same part keep it same. Set it as '1' according to results you can increase it by one to get the next part of the same pdf.","required":true,"schema":{"type":"string"},"example":"1"}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"type":"object","properties":{"matches":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"User's unique id with timestamp the data was inserted to long term memory."},"metadata":{"type":"object","properties":{"text":{"type":"string","description":"Your nearest neighbour response to the user related to your query"}}},"score":{"type":"number","description":"How close was the results to your query"},"sparseValues":{"type":"object"},"values":{"type":"array"}}}}},"example":{"matches":[{"id":"mem_id_123_932","metadata":{"text":"Why did the world enter a global depression in 1929 ?"},"score":0.917971551,"sparseValues":{},"values":[]}]}}}}}}}},"/listpdfs":{"get":{"operationId":"listpdfs","summary":"Lists pdf files uploaded by the user","description":"It provides file name of the uploaded file to reference and the access url","parameters":[],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"type":"object","properties":{"matches":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"User's unique id with timestamp the data was inserted to long term memory."},"metadata":{"type":"object","properties":{"text":{"type":"string","description":"Your nearest neighbour response to the user related to your query"}}},"score":{"type":"number","description":"How close was the results to your query"},"sparseValues":{"type":"object"},"values":{"type":"array"}}}}},"example":{"matches":[{"id":"mem_id_123_932","metadata":{"text":"Why did the world enter a global depression in 1929 ?"},"score":0.917971551,"sparseValues":{},"values":[]}]}}}}}}}},"/search":{"get":{"operationId":"search","summary":"Search Google and fetch HTML content and PDF summary content from the links at the same time in one go.","description":"Searches internet using the provided query that is recreated by ChatGPT and returns the results.Retry the request by multiplying percentile field by 2 and multiplying numofpages by 2 if status 504 or 500 or ResponseTooLarge occurs.Cite link field.","parameters":[{"name":"q","in":"query","description":"Search query","required":true,"schema":{"type":"string"},"example":"python"},{"name":"percentile","in":"query","description":"Start it as '3', increase to '6' if ResponseTooLarge occurs, only reduce to '1' or '2' if user requests it.","required":true,"schema":{"type":"string"},"example":"3"},{"name":"numofpages","in":"query","description":"Start it as '3'. Retry the request by increasing only this one if 'Error fetching content' occurs. Should be between 1 and 10.","required":true,"schema":{"type":"string"},"example":"3"}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","description":"The title of the search result"},"link":{"type":"string","format":"uri","description":"The URL of the search result"},"summary":{"type":"string","description":"A summary of the HTML content of the search result (available for the first five results)"},"full_content":{"type":"string","description":"The entire HTML content of the search result (available for the first three results)"}}}},"rules":{"type":"string","description":"The rules which recommend gpt to follow."}},"example":{"results":[{"title":"Welcome to Python.org","link":"https://www.python.org/","summary":"The official home of the Python Programming Language...","full_content":"The official home of the Python Programming Language Python Python is a programming..."},{"title":"Python (programming language) - Wikipedia","link":"https://en.wikipedia.org/wiki/Python_(programming_language)","summary":"Python is an interpreted, high-level, general-purpose programming language...","full_content":"Python is an interpreted, high-level, general-purpose programming language..."}],"rules":"Always follow the instructions provided"}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}},"example":{"error":"No query provided"}}}}},"default":{"description":"Error fetching search results","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}},"example":{"error":"Error fetching search results"}}}}}}}},"/keymate":{"get":{"operationId":"keymate","summary":"Search Google and fetch HTML content and PDF summary content from the links at the same time in one go.","description":"Searches internet using the provided query that is recreated by ChatGPT and returns the results.Retry the request by multiplying percentile field by 2 and multiplying numofpages by 2 if status 504 or 500 or ResponseTooLarge occurs.Cite link field.","parameters":[{"name":"q","in":"query","description":"Search query","required":true,"schema":{"type":"string"},"example":"python"},{"name":"percentile","in":"query","description":"Start it as '3', increase to '6' if ResponseTooLarge occurs, only reduce to '1' or '2' if user requests it.","required":true,"schema":{"type":"string"},"example":"3"},{"name":"numofpages","in":"query","description":"Start it as '3'. Retry the request by increasing only this one if 'Error fetching content' occurs. Should be between 1 and 10.","required":true,"schema":{"type":"string"},"example":"3"}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","description":"The title of the search result"},"link":{"type":"string","format":"uri","description":"The URL of the search result"},"summary":{"type":"string","description":"A summary of the HTML content of the search result (available for the first five results)"},"full_content":{"type":"string","description":"The entire HTML content of the search result (available for the first three results)"}}}},"rules":{"type":"string","description":"The rules which recommend gpt to follow."}},"example":{"results":[{"title":"Welcome to Python.org","link":"https://www.python.org/","summary":"The official home of the Python Programming Language...","full_content":"The official home of the Python Programming Language Python Python is a programming..."},{"title":"Python (programming language) - Wikipedia","link":"https://en.wikipedia.org/wiki/Python_(programming_language)","summary":"Python is an interpreted, high-level, general-purpose programming language...","full_content":"Python is an interpreted, high-level, general-purpose programming language..."}],"rules":"Always follow the instructions provided"}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}},"example":{"error":"No query provided"}}}}},"default":{"description":"Error fetching search results","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}},"example":{"error":"Error fetching search results"}}}}}}}},"/ultrafastsearch":{"get":{"operationId":"ultrafastsearch","summary":"This plugin provides 10 ultra fast search results from multiple sources giving a more comprehensive view.","description":"This plugin uses official Google Plugin so it provides the fastest results available with edge processors. Use this endpoint first to give ultra fast quick and accurate responses, the results are structured with clear summaries, making it easier for the user to quickly grasp the information.","parameters":[{"name":"q","in":"query","description":"URL of the website.","required":true,"schema":{"type":"string","format":"url"},"example":"https://keymate.ai"},{"name":"percentile","in":"query","description":"Set it as '100'","required":true,"schema":{"type":"string"},"example":"100"},{"name":"numofpages","in":"query","description":"Set it as '10'","required":true,"schema":{"type":"string"},"example":"10"}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","description":"The title of the search result"},"link":{"type":"string","format":"uri","description":"The URL of the search result"},"summary":{"type":"string","description":"A summary of the HTML content of the search result (available for the first five results)"},"full_content":{"type":"string","description":"The entire HTML content of the search result (available for the first three results)"}}}},"rules":{"type":"string","description":"The rules which recommend gpt to follow."}},"example":{"results":[{"title":"Welcome to Python.org","link":"https://www.python.org/","summary":"The official home of the Python Programming Language...","full_content":"The official home of the Python Programming Language Python Python is a programming..."}],"rules":"Always follow the instructions provided"}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}},"example":{"error":"No query provided"}}}}},"default":{"description":"Error fetching search results","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}},"example":{"error":"Error fetching search results"}}}}}}}},"/browse":{"get":{"operationId":"browse","summary":"The plugin enables user to conduct web browsing by extracting the text content of a specified URL. It will generate title and content.","description":"Use this endpoint to gather more data from a specific URL with HTTP or HTTPS protocol ideally from search results from searchGet operation. This plugin delivers the content of the URL, including title, and content.","parameters":[{"name":"q","in":"query","description":"URL of the website.","required":true,"schema":{"type":"string","format":"url"},"example":"https://keymate.ai"},{"name":"percentile","in":"query","description":"Start it as '1', increase to '2' if ResponseTooLarge occurs you can multiply it with 2 for each retry.","required":true,"schema":{"type":"string"},"example":"1"},{"name":"numofpages","in":"query","description":"Set it as '1'","required":true,"schema":{"type":"string"},"example":"1"},{"name":"paging","in":"query","description":"Set it as '1' first then according to results you can increase it by one to get the other part of the same page.","schema":{"type":"string"},"example":"1"}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","description":"The title of the search result"},"link":{"type":"string","format":"uri","description":"The URL of the search result"},"summary":{"type":"string","description":"A summary of the HTML content of the search result (available for the first five results)"},"full_content":{"type":"string","description":"The entire HTML content of the search result (available for the first three results)"}}}},"rules":{"type":"string","description":"The rules which recommend gpt to follow."}},"example":{"results":[{"title":"Welcome to Python.org","link":"https://www.python.org/","summary":"The official home of the Python Programming Language...","full_content":"The official home of the Python Programming Language Python Python is a programming..."}],"rules":"Always follow the instructions provided"}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}},"example":{"error":"No query provided"}}}}},"default":{"description":"Error fetching search results","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}},"example":{"error":"Error fetching search results"}}}}}}}},"/upsert":{"get":{"operationId":"upsert","summary":"Long term memory, ALWAYS USE UPSERT ON YOUR FIRST RESPONSE to add previous response into the user's personal Keymate Memory.","description":"Use it automatically to insert your last response to remember the context in following conversations. Users can opt out if they want. 'queryUsersKnowledgeBase' can be used later to remember the data.","parameters":[{"name":"q","in":"query","description":"Data text to be embedded to personal Pinecone index","required":true,"schema":{"type":"string"},"example":"https://keymate.ai"}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"object","properties":{"status":{"type":"string","description":"The result of the operation"}}}},"example":{"status":"success"}}}}}}}},"/upsertjson":{"post":{"operationId":"upsertjson","summary":"Long term memory, ALWAYS USE UPSERT ON YOUR FIRST RESPONSE to add previous response into the user's personal Keymate Memory.","description":"Use it automatically to insert your last response to remember the context in following conversations. Users can opt out if they want. 'queryUsersKnowledgeBase' can be used later to remember the data.","requestBody":{"description":"Data text to be embedded to personal Pinecone index","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"q":{"type":"string","example":"https://keymate.ai"}}}}}},"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"object","properties":{"status":{"type":"string","description":"The result of the operation"}},"example":{"status":"success"}}}}}}}}}},"/insert":{"get":{"operationId":"insert","summary":"Long term memory, ALWAYS USE UPSERT ON YOUR FIRST RESPONSE to add previous response into the user's personal Keymate Memory.","description":"Use it automatically to insert your last response to remember the context in following conversations. Users can opt out if they want. 'queryUsersKnowledgeBase' can be used later to remember the data.","parameters":[{"name":"q","in":"query","description":"Data text to be embedded to personal Pinecone index","required":true,"schema":{"type":"string"},"example":"https://keymate.ai"}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"object","properties":{"status":{"type":"string","description":"The result of the operation"}}}},"example":{"status":"success"}}}}}}}},"/pdfload":{"get":{"operationId":"pdfload","summary":"Redirect user to the given link in the response that will allow them to store and search their PDF file content","description":"Explain user they should login in the website given and press LOAD PDF button on top left. Any user can use this feature.","responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"object","properties":{"status":{"type":"string","description":"To upload PDF files, please visit: [Upload URL]"}}}},"example":{"status":"success"}}}}}}}},"/pdfsearch":{"get":{"operationId":"pdfsearch","summary":"Queries the user's Keymate Memory. ","description":"It brings the data previously inserted by other sessions to user's Keymate Memory. ","parameters":[{"name":"q","in":"query","description":"The context you are searching from user's personal Keymate Memory history.","required":true,"schema":{"type":"string"},"example":"https://keymate.ai"}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"type":"object","properties":{"matches":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"User's unique id with timestamp the data was inserted to long term memory."},"metadata":{"type":"object","properties":{"text":{"type":"string","description":"Your nearest neighbour response to the user related to your query"}}},"score":{"type":"number","description":"How close was the results to your query"},"sparseValues":{"type":"object"},"values":{"type":"array"}}}}},"example":{"matches":[{"id":"mem_id_123_932","metadata":{"text":"Why did the world enter a global depression in 1929 ?"},"score":0.917971551,"sparseValues":{},"values":[]}]}}}}}}}},"/reset":{"get":{"operationId":"reset","summary":"Deletes and resets the user's Keymate Memory. ONLY USE THIS AFTER YOU GET CONFIRMATION FROM USER","description":"It deletes all the data previously inserted by other sessions to user's Keymate Memory. Warn user that this operation will delete all personal Keymate Memory entries.","parameters":[{"name":"q","in":"query","description":"set this parameter as ''","required":true,"schema":{"type":"string"},"example":""}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"object","properties":{"status":{"type":"string","description":"The result of the operation"}}}},"example":{"status":"success"}}}}}}}},"/browseByUrl":{"get":{"operationId":"browseByUrl","summary":"The plugin enables user to conduct web browsing by extracting the text content of a specified URL. It will generate title and content.","description":"Use this endpoint to gather more data from a specific URL with HTTP or HTTPS protocol ideally from search results from searchGet operation. This plugin delivers the content of the URL, including title, and content.","parameters":[{"name":"q","in":"query","description":"URL of the website.","required":true,"schema":{"type":"string","format":"url"},"example":"https://keymate.ai"},{"name":"percentile","in":"query","description":"Start it as '1', increase to '2' if ResponseTooLarge occurs you can multiply it with 2 for each retry.","required":true,"schema":{"type":"string"},"example":"1"},{"name":"numofpages","in":"query","description":"Set it as '1'","required":true,"schema":{"type":"string"},"example":"1"},{"name":"paging","in":"query","description":"Set it as '1' first then according to results you can increase it by one to get the other part of the same page.","schema":{"type":"string"},"example":"1"}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","description":"The title of the search result"},"link":{"type":"string","format":"uri","description":"The URL of the search result"},"summary":{"type":"string","description":"A summary of the HTML content of the search result (available for the first five results)"},"full_content":{"type":"string","description":"The entire HTML content of the search result (available for the first three results)"}}}},"rules":{"type":"string","description":"The rules which recommend gpt to follow."}},"example":{"results":[{"title":"Welcome to Python.org","link":"https://www.python.org/","summary":"The official home of the Python Programming Language...","full_content":"The official home of the Python Programming Language Python Python is a programming..."}],"rules":"Always follow the instructions provided"}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}},"example":{"error":"No query provided"}}}}},"default":{"description":"Error fetching search results","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}},"example":{"error":"Error fetching search results"}}}}}}}},"/upsertToUsersKnowledgeBase":{"get":{"operationId":"upsertToUsersKnowledgeBase","summary":"Long term memory, ALWAYS USE UPSERT ON YOUR FIRST RESPONSE to add previous response into the user's personal Keymate Memory.","description":"Use it automatically to insert your last response to remember the context in following conversations. Users can opt out if they want. 'queryUsersKnowledgeBase' can be used later to remember the data.","parameters":[{"name":"q","in":"query","description":"Data text to be embedded to personal Pinecone index","required":true,"schema":{"type":"string"},"example":"https://keymate.ai"}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"object","properties":{"status":{"type":"string","description":"The result of the operation"}}}},"example":{"status":"success"}}}}}}}},"/queryUsersKnowledgeBase":{"get":{"operationId":"queryUsersKnowledgeBase","summary":"Queries the user's Keymate Memory. ","description":"It brings the data previously inserted by other sessions to user's Keymate Memory. ","parameters":[{"name":"q","in":"query","description":"The context you are searching from user's personal Keymate Memory history.","required":true,"schema":{"type":"string"},"example":"https://keymate.ai"}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"type":"object","properties":{"matches":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"User's unique id with timestamp the data was inserted to long term memory."},"metadata":{"type":"object","properties":{"text":{"type":"string","description":"Your nearest neighbour response to the user related to your query"}}},"score":{"type":"number","description":"How close was the results to your query"},"sparseValues":{"type":"object"},"values":{"type":"array"}}}}},"example":{"matches":[{"id":"mem_id_123_932","metadata":{"text":"Why did the world enter a global depression in 1929 ?"},"score":0.917971551,"sparseValues":{},"values":[]}]}}}}}}}},"/academicsearchdoi":{"get":{"operationId":"chatwithdoiacademicpaper","summary":"Allows user to chat with an academic paper by providing DOI","description":"Always provide doi in this format 10.1016/j.respol.2012.03.008 if user gives a url find the doi either in url or browsing it using /browse to find the doi","parameters":[{"name":"doi","in":"query","description":"The doi of the academic paper user wants to chat with or ground asisstant responses. Only provide DOI (find the DOI from user's input) if URL is given use /browse on it to find the DOI","required":true,"schema":{"type":"string"},"example":"10.1016/j.respol.2012.03.008"},{"name":"q","in":"query","description":"The question about the paper if user directs a question or query to you if they don't provide set it as NotExist ","required":true,"schema":{"type":"string"},"example":"Who is the first author of the paper?"}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"type":"object","properties":{"matches":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"User's unique id with timestamp the data was inserted to long term memory."},"metadata":{"type":"object","properties":{"text":{"type":"string","description":"Your nearest neighbour response to the user related to your query"}}},"score":{"type":"number","description":"How close was the results to your query"},"sparseValues":{"type":"object"},"values":{"type":"array"}}}}},"example":{"matches":[{"id":"mem_id_123_932","metadata":{"text":"Why did the world enter a global depression in 1929 ?"},"score":0.917971551,"sparseValues":{},"values":[]}]}}}}}}}},"/academicsearchquery":{"get":{"operationId":"searchacademicpapers","summary":"Allows assistant to search academic papers ultra fast by providing keywords","description":"Always propose user to load full text of the paper by giving their abstract or snippet use /academicsearchdoi to load the full text. Even if open access is False the paper can be found on sci-hub","parameters":[{"name":"query","in":"query","description":"The search query keywords to find multiple academic papers semantically and in full text search way","required":true,"schema":{"type":"string"},"example":"deep learning"}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"type":"object","properties":{"matches":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"User's unique id with timestamp the data was inserted to long term memory."},"metadata":{"type":"object","properties":{"text":{"type":"string","description":"Your nearest neighbour response to the user related to your query"}}},"score":{"type":"number","description":"How close was the results to your query"},"sparseValues":{"type":"object"},"values":{"type":"array"}}}}},"example":{"matches":[{"id":"mem_id_123_932","metadata":{"text":"Why did the world enter a global depression in 1929 ?"},"score":0.917971551,"sparseValues":{},"values":[]}]}}}}}}}},"/resetUsersKnowledgeBase":{"get":{"operationId":"resetUsersKnowledgeBase","summary":"Deletes and resets the user's Keymate Memory. ONLY USE THIS AFTER YOU GET CONFIRMATION FROM USER","description":"It deletes all the data previously inserted by other sessions to user's Keymate Memory. Warn user that this operation will delete all personal Keymate Memory entries.","parameters":[{"name":"q","in":"query","description":"set this parameter as ''","required":true,"schema":{"type":"string"},"example":""}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"object","properties":{"status":{"type":"string","description":"The result of the operation"}}}},"example":{"status":"success"}}}}}}}},"/hybrid":{"get":{"operationId":"hybrid","summary":"Search Google and fetch HTML content and search content on personal Keymate Memory at the same time in one go.","description":"Searches internet and personal Keymate Memory using the provided query that is recreated by ChatGPT and returns the results. Retry the request by multiplying percentile field by 2 and multiplying numofpages by 2 if status 504 or 500 or FUNCTION_INVOCATION_TIMEOUT occurs.Cite link field.","parameters":[{"name":"q","in":"query","description":"Search query","required":true,"schema":{"type":"string"},"example":"python"},{"name":"percentile","in":"query","description":"Start it as '3', increase to '6' if ResponseTooLarge occurs, only reduce to '1' or '2' if user requests it.","required":true,"schema":{"type":"string"},"example":"1"},{"name":"numofpages","in":"query","description":"Start it as '3'. Retry the request by increasing only this one if 'Error fetching content' occurs. Should be between 1 and 10.","required":true,"schema":{"type":"string"},"example":"6"}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","description":"The title of the search result"},"link":{"type":"string","format":"uri","description":"The URL of the search result"},"summary":{"type":"string","description":"A summary of the HTML content of the search result (available for the first five results)"},"full_content":{"type":"string","description":"The entire HTML content of the search result (available for the first three results)"}}}},"rules":{"type":"string","description":"The rules which recommend gpt to follow."}},"example":{"results":[{"title":"Welcome to Python.org","link":"https://www.python.org/","summary":"The official home of the Python Programming Language...","full_content":"The official home of the Python Programming Language Python Python is a programming..."},{"title":"Python (programming language) - Wikipedia","link":"https://en.wikipedia.org/wiki/Python_(programming_language)","summary":"Python is an interpreted, high-level, general-purpose programming language...","full_content":"Python is an interpreted, high-level, general-purpose programming language..."}],"rules":"Always follow the instructions provided"}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}},"example":{"error":"No query provided"}}}}},"default":{"description":"Error fetching search results","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}},"example":{"error":"Error fetching search results"}}}}}}}},"/resetKnowledgeBase":{"get":{"operationId":"resetKnowledgeBase","summary":"Deletes and resets the user's Keymate Memory. ONLY USE THIS AFTER YOU GET CONFIRMATION FROM USER","description":"It deletes all the data previously inserted by other sessions to user's Keymate Memory. Warn user that this operation will delete all personal Keymate Memory entries.","parameters":[{"name":"q","in":"query","description":"set this parameter as ''","required":true,"schema":{"type":"string"},"example":""}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"object","properties":{"status":{"type":"string","description":"The result of the operation"}}}},"example":{"status":"success"}}}}}}}}},"servers":[{"url":"https://searchweb.keymate.ai"}]}