diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 6af52c4..7aa7104 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -3,10 +3,10 @@ id: f4737fb0-7722-4088-8814-c36f84b40f28 management: docChecksum: 7ba09a9986f7230b7abacf151bbb031b docVersion: 1.0.1 - speakeasyVersion: 1.204.1 - generationVersion: 2.279.1 - releaseVersion: 0.7.0 - configChecksum: ed22ad21b9e5e4c5a077a77dea5416da + speakeasyVersion: 1.207.1 + generationVersion: 2.280.6 + releaseVersion: 0.7.1 + configChecksum: b40b59414e67fac07b412a045952208f repoURL: https://github.com/speakeasy-sdks/keymate-api-python.git repoSubDirectory: . installationURL: https://github.com/speakeasy-sdks/keymate-api-python.git @@ -16,7 +16,7 @@ features: core: 4.5.1 flattening: 2.81.1 globalSecurity: 2.83.4 - globalServerURLs: 2.82.1 + globalServerURLs: 2.82.2 responseFormat: 0.1.0 generatedFiles: - src/keymate_api/sdkconfiguration.py diff --git a/RELEASES.md b/RELEASES.md index 68e09e6..3452f8d 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -208,4 +208,14 @@ Based on: ### Generated - [python v0.7.0] . ### Releases -- [PyPI v0.7.0] https://pypi.org/project/Keymate-API/0.7.0 - . \ No newline at end of file +- [PyPI v0.7.0] https://pypi.org/project/Keymate-API/0.7.0 - . + +## 2024-03-13 00:24:24 +### Changes +Based on: +- OpenAPI Doc 1.0.1 +- Speakeasy CLI 1.207.1 (2.280.6) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v0.7.1] . +### Releases +- [PyPI v0.7.1] https://pypi.org/project/Keymate-API/0.7.1 - . \ No newline at end of file diff --git a/gen.yaml b/gen.yaml index 57286d3..18a6c35 100644 --- a/gen.yaml +++ b/gen.yaml @@ -10,7 +10,7 @@ generation: auth: oAuth2ClientCredentialsEnabled: false python: - version: 0.7.0 + version: 0.7.1 additionalDependencies: dependencies: {} extraDependencies: diff --git a/setup.py b/setup.py index b6b6c27..6a4eecb 100644 --- a/setup.py +++ b/setup.py @@ -10,7 +10,7 @@ setuptools.setup( name="Keymate-API", - version="0.7.0", + version="0.7.1", author="Keymate", description="Python Client SDK Generated by Keymate", long_description=long_description, diff --git a/src/keymate_api/sdk.py b/src/keymate_api/sdk.py index ed347a5..9f06c07 100644 --- a/src/keymate_api/sdk.py +++ b/src/keymate_api/sdk.py @@ -14,14 +14,14 @@ class KeymateAPI: def __init__(self, bearer_auth: Union[str, Callable[[], str]], - server_idx: int = None, - server_url: str = None, - url_params: Dict[str, str] = None, - client: requests_http.Session = None, - retry_config: utils.RetryConfig = None + server_idx: Optional[int] = None, + server_url: Optional[str] = None, + url_params: Optional[Dict[str, str]] = None, + client: Optional[requests_http.Session] = None, + retry_config: Optional[utils.RetryConfig] = None ) -> None: """Instantiates the SDK configuring it with the provided parameters. - + :param bearer_auth: The bearer_auth required for authentication :type bearer_auth: Union[str, Callable[[], str]] :param server_idx: The index of the server to use for all operations @@ -37,18 +37,24 @@ def __init__(self, """ if client is None: client = requests_http.Session() - + if callable(bearer_auth): def security(): return components.Security(bearer_auth = bearer_auth()) else: security = components.Security(bearer_auth = bearer_auth) - + if server_url is not None: if url_params is not None: server_url = utils.template_url(server_url, url_params) - self.sdk_configuration = SDKConfiguration(client, security, server_url, server_idx, retry_config=retry_config) + self.sdk_configuration = SDKConfiguration( + client, + security, + server_url, + server_idx, + retry_config=retry_config + ) hooks = SDKHooks() @@ -58,13 +64,9 @@ def security(): self.sdk_configuration.server_url = server_url # pylint: disable=protected-access - self.sdk_configuration._hooks=hooks - - - - - - + self.sdk_configuration._hooks = hooks + + def browse(self, numofpages: str, percentile: str, q: str, paging: Optional[str] = None) -> operations.BrowseResponse: r"""The plugin enables user to conduct web browsing by extracting the text content of a specified URL. It will generate title and content. 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. @@ -141,8 +143,8 @@ def browse(self, numofpages: str, percentile: str, q: str, paging: Optional[str] return res - - + + def browse_by_url(self, numofpages: str, percentile: str, q: str, paging: Optional[str] = None) -> operations.BrowseByURLResponse: r"""The plugin enables user to conduct web browsing by extracting the text content of a specified URL. It will generate title and content. 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. @@ -219,8 +221,8 @@ def browse_by_url(self, numofpages: str, percentile: str, q: str, paging: Option return res - - + + def document(self, file_name: str, part_id: str, q: str) -> operations.DocumentResponse: r"""Allows user to load and use content about specific uploaded document Use this when you have fileUrl from listpdfs operation or fileName given by user @@ -283,8 +285,8 @@ def document(self, file_name: str, part_id: str, q: str) -> operations.DocumentR return res - - + + def fast(self, numofpages: str, percentile: str, q: str) -> operations.FastResponse: r"""This plugin provides 10 ultra fast search results from multiple sources giving a more comprehensive view. 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. @@ -360,8 +362,8 @@ def fast(self, numofpages: str, percentile: str, q: str) -> operations.FastRespo return res - - + + def halloween(self) -> operations.HalloweenResponse: r"""This command returns a halloween story idea in halloween week 2023 You should obey user's command if user start the command with / character @@ -417,8 +419,8 @@ def halloween(self) -> operations.HalloweenResponse: return res - - + + def help(self) -> operations.HelpResponse: r"""This command returns latest information about how to use internetSearch KeyMate Plugin You should obey user's command if user start the command with / character @@ -474,8 +476,8 @@ def help(self) -> operations.HelpResponse: return res - - + + def hybrid(self, numofpages: str, percentile: str, q: str) -> operations.HybridResponse: r"""Search Google and fetch HTML content and search content on personal knowledge base at the same time in one go. Searches internet and personal knowledge base 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. @@ -551,8 +553,8 @@ def hybrid(self, numofpages: str, percentile: str, q: str) -> operations.HybridR return res - - + + def insert(self, q: str) -> operations.InsertResponse: r"""Long term memory, ALWAYS USE UPSERT ON YOUR FIRST RESPONSE to add previous response into the user's personal knowledge base. 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. @@ -613,8 +615,8 @@ def insert(self, q: str) -> operations.InsertResponse: return res - - + + def keymate(self, numofpages: str, percentile: str, q: str) -> operations.KeymateResponse: r"""Search Google and fetch HTML content and PDF summary content from the links at the same time in one go. 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. @@ -690,8 +692,8 @@ def keymate(self, numofpages: str, percentile: str, q: str) -> operations.Keymat return res - - + + def list(self) -> operations.ListResponse: r"""Returns a message from the server about commands that can be run on the internetSearch KeyMate plugin. You should obey user's command if user start the command with / character @@ -747,8 +749,8 @@ def list(self) -> operations.ListResponse: return res - - + + def listpdfs(self) -> operations.ListpdfsResponse: r"""Lists pdf files uploaded by the user It provides file name of the uploaded file to reference and the access url @@ -804,8 +806,8 @@ def listpdfs(self) -> operations.ListpdfsResponse: return res - - + + def metadatakb(self, q: str) -> operations.MetadatakbResponse: r"""Allows you to answer introductory info about users knowledge base. It brings the metadata about knowledge base. Shows number of records and a sample record. @@ -866,8 +868,8 @@ def metadatakb(self, q: str) -> operations.MetadatakbResponse: return res - - + + def pdfload(self) -> operations.PdfloadResponse: r"""Redirect user to the given link in the response that will allow them to store and search their PDF file content Explain user they should login in the website given and press LOAD PDF button on top left. Any user can use this feature. @@ -923,8 +925,8 @@ def pdfload(self) -> operations.PdfloadResponse: return res - - + + def pdfpro(self, file_name: str, part_id: str, q: str) -> operations.PdfproResponse: r"""Allows user to load and use content about specific uploaded pdf Use this when you have fileUrl from listpdfs operation or fileName given by user @@ -987,8 +989,8 @@ def pdfpro(self, file_name: str, part_id: str, q: str) -> operations.PdfproRespo return res - - + + def pdfsearch(self, q: str) -> operations.PdfsearchResponse: r"""Queries the user's knowledge base. It brings the data previously inserted by other sessions to user's knowledge base. @@ -1049,8 +1051,8 @@ def pdfsearch(self, q: str) -> operations.PdfsearchResponse: return res - - + + def pkb(self, q: str) -> operations.PkbResponse: r"""Queries the user's knowledge base. It brings the data previously inserted by other sessions to user's knowledge base. @@ -1111,8 +1113,8 @@ def pkb(self, q: str) -> operations.PkbResponse: return res - - + + def query(self, q: str) -> operations.QueryResponse: r"""Queries the user's knowledge base. It brings the data previously inserted by other sessions to user's knowledge base. @@ -1173,8 +1175,8 @@ def query(self, q: str) -> operations.QueryResponse: return res - - + + def query_users_knowledge_base(self, q: str) -> operations.QueryUsersKnowledgeBaseResponse: r"""Queries the user's knowledge base. It brings the data previously inserted by other sessions to user's knowledge base. @@ -1235,8 +1237,8 @@ def query_users_knowledge_base(self, q: str) -> operations.QueryUsersKnowledgeBa return res - - + + def reset_users_knowledge_base(self, q: str) -> operations.ResetUsersKnowledgeBaseResponse: r"""Deletes and resets the user's knowledge base. ONLY USE THIS AFTER YOU GET CONFIRMATION FROM USER It deletes all the data previously inserted by other sessions to user's knowledge base. Warn user that this operation will delete all personal knowledge base entries. @@ -1297,8 +1299,8 @@ def reset_users_knowledge_base(self, q: str) -> operations.ResetUsersKnowledgeBa return res - - + + def resetknowledgebase(self, q: str) -> operations.ResetknowledgebaseResponse: r"""Deletes and resets the user's knowledge base. ONLY USE THIS AFTER YOU GET CONFIRMATION FROM USER It deletes all the data previously inserted by other sessions to user's knowledge base. Warn user that this operation will delete all personal knowledge base entries. @@ -1359,8 +1361,8 @@ def resetknowledgebase(self, q: str) -> operations.ResetknowledgebaseResponse: return res - - + + def savetopkb(self, q: str) -> operations.SavetopkbResponse: r"""Long term memory, ALWAYS USE UPSERT ON YOUR FIRST RESPONSE to add previous response into the user's personal knowledge base. 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. @@ -1421,8 +1423,8 @@ def savetopkb(self, q: str) -> operations.SavetopkbResponse: return res - - + + def search(self, numofpages: str, percentile: str, q: str) -> operations.SearchResponse: r"""Search Google and fetch HTML content and PDF summary content from the links at the same time in one go. 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. @@ -1498,8 +1500,8 @@ def search(self, numofpages: str, percentile: str, q: str) -> operations.SearchR return res - - + + def search_and_browse(self, numofpages: str, percentile: str, q: str) -> operations.SearchAndBrowseResponse: r"""Search Google and fetch HTML content and PDF summary content from the links at the same time in one go. 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. @@ -1575,8 +1577,8 @@ def search_and_browse(self, numofpages: str, percentile: str, q: str) -> operati return res - - + + def ultrafastsearch(self, numofpages: str, percentile: str, q: str) -> operations.UltrafastsearchResponse: r"""This plugin provides 10 ultra fast search results from multiple sources giving a more comprehensive view. 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. @@ -1652,8 +1654,8 @@ def ultrafastsearch(self, numofpages: str, percentile: str, q: str) -> operation return res - - + + def upsert(self, q: str) -> operations.UpsertResponse: r"""Long term memory, ALWAYS USE UPSERT ON YOUR FIRST RESPONSE to add previous response into the user's personal knowledge base. 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. @@ -1714,8 +1716,8 @@ def upsert(self, q: str) -> operations.UpsertResponse: return res - - + + def upsert_to_users_knowledge_base(self, q: str) -> operations.UpsertToUsersKnowledgeBaseResponse: r"""Long term memory, ALWAYS USE UPSERT ON YOUR FIRST RESPONSE to add previous response into the user's personal knowledge base. 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. @@ -1776,8 +1778,8 @@ def upsert_to_users_knowledge_base(self, q: str) -> operations.UpsertToUsersKnow return res - - + + def upsertjson(self, request: operations.UpsertjsonRequestBody) -> operations.UpsertjsonResponse: r"""Long term memory, ALWAYS USE UPSERT ON YOUR FIRST RESPONSE to add previous response into the user's personal knowledge base. 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. @@ -1838,4 +1840,3 @@ def upsertjson(self, request: operations.UpsertjsonRequestBody) -> operations.Up return res - \ No newline at end of file diff --git a/src/keymate_api/sdkconfiguration.py b/src/keymate_api/sdkconfiguration.py index 7adbf8e..ee9c3d4 100644 --- a/src/keymate_api/sdkconfiguration.py +++ b/src/keymate_api/sdkconfiguration.py @@ -23,9 +23,9 @@ class SDKConfiguration: server_idx: int = 0 language: str = 'python' openapi_doc_version: str = '1.0.1' - sdk_version: str = '0.7.0' - gen_version: str = '2.279.1' - user_agent: str = 'speakeasy-sdk/python 0.7.0 2.279.1 1.0.1 Keymate-API' + sdk_version: str = '0.7.1' + gen_version: str = '2.280.6' + user_agent: str = 'speakeasy-sdk/python 0.7.1 2.280.6 1.0.1 Keymate-API' retry_config: RetryConfig = None _hooks: SDKHooks = None