Elffuss BraidHub

kikocis/continue public

c977fe2591e2 · 6.6 KiBRenderedRawPermalink
1# openapi-client
2
3API for Continue IDE to fetch assistants and other related information.
4These endpoints are primarily used by the Continue IDE extensions for VS Code and JetBrains.
5
6This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
7
8- API version: 1.0.0
9- Package version: 1.0.0
10- Generator version: 7.12.0
11- Build package: org.openapitools.codegen.languages.PythonClientCodegen
12 For more information, please visit [https://continue.dev](https://continue.dev)
13
14## Requirements.
15
16Python 3.8+
17
18## Installation & Usage
19
20### pip install
21
22If the python package is hosted on a repository, you can install directly using:
23
24```sh
25pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
26```
27
28(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`)
29
30Then import the package:
31
32```python
33import openapi_client
34```
35
36### Setuptools
37
38Install via [Setuptools](http://pypi.python.org/pypi/setuptools).
39
40```sh
41python setup.py install --user
42```
43
44(or `sudo python setup.py install` to install the package for all users)
45
46Then import the package:
47
48```python
49import openapi_client
50```
51
52### Tests
53
54Execute `pytest` to run the tests.
55
56## Getting Started
57
58Please follow the [installation procedure](#installation--usage) and then run the following:
59
60```python
61
62import openapi_client
63from openapi_client.rest import ApiException
64from pprint import pprint
65
66# Defining the host is optional and defaults to https://api.continue.dev
67# See configuration.py for a list of all supported configuration parameters.
68configuration = openapi_client.Configuration(
69 host = "https://api.continue.dev"
70)
71
72# The client must configure the authentication and authorization parameters
73# in accordance with the API server security policy.
74# Examples for each auth method are provided below, use the example that
75# satisfies your auth use case.
76
77# Configure Bearer authorization: apiKeyAuth
78configuration = openapi_client.Configuration(
79 access_token = os.environ["BEARER_TOKEN"]
80)
81
82
83# Enter a context with an instance of the API client
84with openapi_client.ApiClient(configuration) as api_client:
85 # Create an instance of the API class
86 api_instance = openapi_client.DefaultApi(api_client)
87 owner_slug = 'owner_slug_example' # str | Slug of the user or organization that owns the assistant
88 package_slug = 'package_slug_example' # str | Slug of the assistant package
89 always_use_proxy = 'always_use_proxy_example' # str | Whether to always use the Continue-managed proxy for model requests (optional)
90 organization_id = 'organization_id_example' # str | ID of the organization to scope assistants to. If not provided, personal assistants are returned. (optional)
91
92 try:
93 # Get a specific assistant by slug
94 api_response = api_instance.get_assistant(owner_slug, package_slug, always_use_proxy=always_use_proxy, organization_id=organization_id)
95 print("The response of DefaultApi->get_assistant:\n")
96 pprint(api_response)
97 except ApiException as e:
98 print("Exception when calling DefaultApi->get_assistant: %s\n" % e)
99
100```
101
102## Documentation for API Endpoints
103
104All URIs are relative to *https://api.continue.dev*
105
106| Class | Method | HTTP request | Description |
107| ------------ | --------------------------------------------------------------------------------------- | ---------------------------------------------------- | ------------------------------------------------- |
108| _DefaultApi_ | [**get_assistant**](docs/DefaultApi.md#get_assistant) | **GET** /ide/get-assistant/{ownerSlug}/{packageSlug} | Get a specific assistant by slug |
109| _DefaultApi_ | [**get_free_trial_status**](docs/DefaultApi.md#get_free_trial_status) | **GET** /ide/free-trial-status | Get free trial status for user |
110| _DefaultApi_ | [**get_models_add_on_checkout_url**](docs/DefaultApi.md#get_models_add_on_checkout_url) | **GET** /ide/get-models-add-on-checkout-url | Get Stripe checkout URL for models add-on |
111| _DefaultApi_ | [**get_policy**](docs/DefaultApi.md#get_policy) | **GET** /ide/policy | Get organization policy |
112| _DefaultApi_ | [**list_assistant_full_slugs**](docs/DefaultApi.md#list_assistant_full_slugs) | **GET** /ide/list-assistant-full-slugs | List assistant full slugs (currently returns 429) |
113| _DefaultApi_ | [**list_assistants**](docs/DefaultApi.md#list_assistants) | **GET** /ide/list-assistants | List assistants for IDE |
114| _DefaultApi_ | [**list_organizations**](docs/DefaultApi.md#list_organizations) | **GET** /ide/list-organizations | List organizations for user |
115| _DefaultApi_ | [**sync_secrets**](docs/DefaultApi.md#sync_secrets) | **POST** /ide/sync-secrets | Synchronize secrets for user |
116
117## Documentation For Models
118
119- [GetAssistant200Response](docs/GetAssistant200Response.md)
120- [GetAssistant403Response](docs/GetAssistant403Response.md)
121- [GetAssistant404Response](docs/GetAssistant404Response.md)
122- [GetFreeTrialStatus200Response](docs/GetFreeTrialStatus200Response.md)
123- [GetModelsAddOnCheckoutUrl200Response](docs/GetModelsAddOnCheckoutUrl200Response.md)
124- [GetModelsAddOnCheckoutUrl500Response](docs/GetModelsAddOnCheckoutUrl500Response.md)
125- [GetPolicy200Response](docs/GetPolicy200Response.md)
126- [ListAssistantFullSlugs429Response](docs/ListAssistantFullSlugs429Response.md)
127- [ListAssistants200ResponseInner](docs/ListAssistants200ResponseInner.md)
128- [ListAssistants200ResponseInnerConfigResult](docs/ListAssistants200ResponseInnerConfigResult.md)
129- [ListAssistants401Response](docs/ListAssistants401Response.md)
130- [ListAssistants404Response](docs/ListAssistants404Response.md)
131- [ListOrganizations200Response](docs/ListOrganizations200Response.md)
132- [ListOrganizations200ResponseOrganizationsInner](docs/ListOrganizations200ResponseOrganizationsInner.md)
133- [SyncSecretsRequest](docs/SyncSecretsRequest.md)
134
135<a id="documentation-for-authorization"></a>
136
137## Documentation For Authorization
138
139Authentication schemes defined for the API:
140<a id="apiKeyAuth"></a>
141
142### apiKeyAuth
143
144- **Type**: Bearer authentication
145
146## Author