naas-abi-core 1.3.0__py3-none-any.whl → 1.4.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- assets/logo.png +0 -0
- naas_abi_core/apps/api/openapi_doc.py +0 -163
- naas_abi_core/services/triple_store/adaptors/secondary/AWSNeptune.py +7 -1
- naas_abi_core/utils/{OntologyYaml.disabled.py → OntologyYaml.py} +6 -4
- {naas_abi_core-1.3.0.dist-info → naas_abi_core-1.4.0.dist-info}/METADATA +3 -1
- {naas_abi_core-1.3.0.dist-info → naas_abi_core-1.4.0.dist-info}/RECORD +8 -7
- {naas_abi_core-1.3.0.dist-info → naas_abi_core-1.4.0.dist-info}/WHEEL +0 -0
- {naas_abi_core-1.3.0.dist-info → naas_abi_core-1.4.0.dist-info}/entry_points.txt +0 -0
assets/logo.png
ADDED
|
Binary file
|
|
@@ -46,169 +46,6 @@ print(response.json())
|
|
|
46
46
|
```
|
|
47
47
|
""",
|
|
48
48
|
},
|
|
49
|
-
{
|
|
50
|
-
"name": "Connections",
|
|
51
|
-
"description": """
|
|
52
|
-
Connections are currently configured using Integration secrets (API keys, credentials) set up in the GitHub project settings. \n
|
|
53
|
-
Learn more about the data access and secrets key [here](https://github.com/jupyter-naas/abi/blob/main/README.md#setup-github-repository-secrets).
|
|
54
|
-
|
|
55
|
-
### Agicap
|
|
56
|
-
Required:
|
|
57
|
-
- `AGICAP_USERNAME`: Username of your Agicap account
|
|
58
|
-
- `AGICAP_PASSWORD`: Password of your Agicap account
|
|
59
|
-
- `AGICAP_CLIENT_ID`: Client ID of your Agicap account. [Get your client ID](https://app.agicap.com/fr/app/organization-advanced-settings/public-api)
|
|
60
|
-
- `AGICAP_CLIENT_SECRET`: Client Secret of your Agicap account. [Get your client secret](https://app.agicap.com/fr/app/organization-advanced-settings/public-api)
|
|
61
|
-
- `AGICAP_BEARER_TOKEN`: Bearer Token of your Agicap account.
|
|
62
|
-
- `AGICAP_API_TOKEN`: API token of your Agicap account. [Get your API token](https://app.agicap.com/fr/app/parametres/openapi)
|
|
63
|
-
|
|
64
|
-
### Algolia
|
|
65
|
-
Required:
|
|
66
|
-
- `ALGOLIA_API_KEY`: API key of your Algolia account. [Get your API key](https://www.algolia.com/api-keys)
|
|
67
|
-
- `ALGOLIA_APPLICATION_ID`: Application ID of your Algolia account. [Get your application ID](https://www.algolia.com/api-keys)
|
|
68
|
-
|
|
69
|
-
### Airtable
|
|
70
|
-
Required:
|
|
71
|
-
- `AIRTABLE_API_KEY`: API key of your Airtable account. [Get your API key](https://airtable.com/create/tokens)
|
|
72
|
-
- `AIRTABLE_BASE_ID`: Base ID of your Airtable account. [Get your base ID](https://airtable.com/create/tokens)
|
|
73
|
-
|
|
74
|
-
### AWS
|
|
75
|
-
Required:
|
|
76
|
-
- `AWS_ACCESS_KEY_ID`: Access key ID of your AWS account. [Get your access key ID](https://us-east-1.console.aws.amazon.com/iam/home)
|
|
77
|
-
- `AWS_SECRET_ACCESS_KEY`: Secret access key of your AWS account. [Get your secret access key](https://us-east-1.console.aws.amazon.com/iam/home)
|
|
78
|
-
- `AWS_REGION`: Region of your AWS account. [Get your region](https://us-east-1.console.aws.amazon.com/iam/home)
|
|
79
|
-
|
|
80
|
-
### Brevo
|
|
81
|
-
Required:
|
|
82
|
-
- `BREVO_API_KEY`: API key of your Brevo account. [Get your API key](https://help.brevo.com/hc/en-us/articles/209467485)
|
|
83
|
-
|
|
84
|
-
### Clockify
|
|
85
|
-
Required:
|
|
86
|
-
- `CLOCKIFY_API_KEY`: API key of your Clockify account. [Get your API key](https://clockify.me/user/settings)
|
|
87
|
-
|
|
88
|
-
### Discord
|
|
89
|
-
Required:
|
|
90
|
-
- `DISCORD_API_KEY`: API key of your Discord account. [Get your API key](https://discord.com/developers/applications)
|
|
91
|
-
|
|
92
|
-
### Github
|
|
93
|
-
Required:
|
|
94
|
-
- `GITHUB_ACCESS_TOKEN`: Access token of your Github account. [Get your access token](https://github.com/settings/tokens)
|
|
95
|
-
|
|
96
|
-
### Gladia
|
|
97
|
-
Required:
|
|
98
|
-
- `GLADIA_API_KEY`: API key of your Gladia account. [Get your API key](https://www.gladia.ai/)
|
|
99
|
-
|
|
100
|
-
### Gmail
|
|
101
|
-
Required:
|
|
102
|
-
- `GMAIL_EMAIL`: Email of your Gmail account.
|
|
103
|
-
- `GMAIL_APP_PASSWORD`: App password of your Gmail account. [Get your app password](https://support.google.com/mail/answer/185833)
|
|
104
|
-
|
|
105
|
-
### Harvest
|
|
106
|
-
Required:
|
|
107
|
-
- `HARVEST_API_KEY`: API key of your Harvest account. [Get your API key](https://app.harvestapp.com/account/api)
|
|
108
|
-
- `HARVEST_ACCOUNT_ID`: Account ID of your Harvest account.
|
|
109
|
-
|
|
110
|
-
### HubSpot
|
|
111
|
-
Required:
|
|
112
|
-
- `HUBSPOT_ACCESS_TOKEN`: Access token of your HubSpot account. [Get your access token](https://developers.hubspot.com/docs/api/private-apps)
|
|
113
|
-
|
|
114
|
-
### Instagram
|
|
115
|
-
Required:
|
|
116
|
-
- `INSTAGRAM_ACCESS_TOKEN`: Access token of your Instagram account. [Get your access token](https://developers.facebook.com/docs/instagram-api)
|
|
117
|
-
|
|
118
|
-
### LinkedIn
|
|
119
|
-
Required:
|
|
120
|
-
- `li_at` cookie: li_at cookie of your LinkedIn account. [Get your li_at cookie](https://www.notion.so/LinkedIn-driver-Get-your-cookies)
|
|
121
|
-
- `JSESSIONID` cookie: JSESSIONID cookie of your LinkedIn account. [Get your JSESSIONID cookie](https://www.notion.so/LinkedIn-driver-Get-your-cookies)
|
|
122
|
-
|
|
123
|
-
### Mailchimp
|
|
124
|
-
Required:
|
|
125
|
-
- `MAILCHIMP_API_KEY`: API key of your Mailchimp account. [Get your API key](https://mailchimp.com/developer/api/)
|
|
126
|
-
- `MAILCHIMP_SERVER_PREFIX`: Server prefix of your Mailchimp account. [Get your server prefix](https://mailchimp.com/developer/api/)
|
|
127
|
-
|
|
128
|
-
### Mercury
|
|
129
|
-
Required:
|
|
130
|
-
- `MERCURY_API_TOKEN`: API token of your Mercury account. [Get your API token](https://app.mercury.com/settings/tokens)
|
|
131
|
-
|
|
132
|
-
### NewsAPI
|
|
133
|
-
Required:
|
|
134
|
-
- `NEWSAPI_API_KEY`: API key of your NewsAPI account. [Get your API key](https://newsapi.org/register)
|
|
135
|
-
|
|
136
|
-
### Notion
|
|
137
|
-
Required:
|
|
138
|
-
- `NOTION_API_KEY`: API key of your Notion account. [Get your API key](https://www.notion.so/my-integrations)
|
|
139
|
-
|
|
140
|
-
### OneDrive
|
|
141
|
-
Required:
|
|
142
|
-
- `ONEDRIVE_ACCESS_TOKEN`: Access token of your OneDrive account. [Get your access token](https://learn.microsoft.com/en-us/onedrive/developer/rest-api/getting-started/)
|
|
143
|
-
|
|
144
|
-
### Pennylane
|
|
145
|
-
Required:
|
|
146
|
-
- `PENNYLANE_API_TOKEN`: API token of your Pennylane account. [Get your API token](https://pennylane.readme.io/docs/get-my-api-token)
|
|
147
|
-
|
|
148
|
-
### Perplexity
|
|
149
|
-
Required:
|
|
150
|
-
- `PERPLEXITY_API_KEY`: API key of your Perplexity account. [Get your API key](https://docs.perplexity.ai/docs/getting-started)
|
|
151
|
-
|
|
152
|
-
### Pipedrive
|
|
153
|
-
Required:
|
|
154
|
-
- `PIPEDRIVE_API_KEY`: API key of your Pipedrive account. [Get your API key](https://app.pipedrive.com/settings/api)
|
|
155
|
-
|
|
156
|
-
### PostgreSQL
|
|
157
|
-
Required:
|
|
158
|
-
- `POSTGRES_HOST`: Host of your PostgreSQL database.
|
|
159
|
-
- `POSTGRES_PORT`: Port of your PostgreSQL database.
|
|
160
|
-
- `POSTGRES_DB`: Database name of your PostgreSQL database.
|
|
161
|
-
- `POSTGRES_USER`: User of your PostgreSQL database.
|
|
162
|
-
- `POSTGRES_PASSWORD`: Password of your PostgreSQL database.
|
|
163
|
-
|
|
164
|
-
### Qonto
|
|
165
|
-
Required:
|
|
166
|
-
- `QONTO_ORGANIZATION_SLUG`: Organization slug of your Qonto account. [Get your organization slug](https://support-fr.qonto.com/hc/en-us/articles/23947692362513)
|
|
167
|
-
- `QONTO_SECRET_KEY`: Secret key of your Qonto account. [Get your secret key](https://support-fr.qonto.com/hc/en-us/articles/23947692362513)
|
|
168
|
-
|
|
169
|
-
### Replicate
|
|
170
|
-
Required:
|
|
171
|
-
- `REPLICATE_API_KEY`: API key of your Replicate account. [Get your API key](https://replicate.com/account/api-tokens)
|
|
172
|
-
|
|
173
|
-
### Serper
|
|
174
|
-
Required:
|
|
175
|
-
- `SERPER_API_KEY`: API key of your Serper account. [Get your API key](https://serper.dev/api-key)
|
|
176
|
-
|
|
177
|
-
### Slack
|
|
178
|
-
Required:
|
|
179
|
-
- `SLACK_BOT_TOKEN`: Bot token of your Slack account. [Get your bot token](https://api.slack.com/apps)
|
|
180
|
-
|
|
181
|
-
### Stripe
|
|
182
|
-
Required:
|
|
183
|
-
- `STRIPE_API_KEY`: API key of your Stripe account. [Get your API key](https://dashboard.stripe.com/apikeys)
|
|
184
|
-
|
|
185
|
-
### Supabase
|
|
186
|
-
Required:
|
|
187
|
-
- `SUPABASE_URL`: URL of your Supabase account. [Get your URL](https://app.supabase.com/project/_/settings/api)
|
|
188
|
-
- `SUPABASE_KEY`: Key of your Supabase account. [Get your key](https://app.supabase.com/project/_/settings/api)
|
|
189
|
-
|
|
190
|
-
### TikTok
|
|
191
|
-
Required:
|
|
192
|
-
- `TIKTOK_ACCESS_TOKEN`: Access token of your TikTok account. [Get your access token](https://developers.tiktok.com/)
|
|
193
|
-
|
|
194
|
-
### WhatsApp
|
|
195
|
-
Required:
|
|
196
|
-
- `WHATSAPP_ACCESS_TOKEN`: Access token of your WhatsApp account. [Get your access token](https://developers.facebook.com/docs/whatsapp/cloud-api/get-started)
|
|
197
|
-
|
|
198
|
-
### Yahoo Finance
|
|
199
|
-
Required:
|
|
200
|
-
- `YAHOO_FINANCE_API_KEY`: API key of your Yahoo Finance account. [Get your API key](https://www.yahoofinanceapi.com/)
|
|
201
|
-
|
|
202
|
-
### YouTube
|
|
203
|
-
Required:
|
|
204
|
-
- `YOUTUBE_API_KEY`: API key of your YouTube account. [Get your API key](https://console.cloud.google.com/apis/credentials)
|
|
205
|
-
|
|
206
|
-
### ZeroBounce
|
|
207
|
-
Required:
|
|
208
|
-
- `ZEROBOUNCE_API_KEY`: API key of your ZeroBounce account. [Get your API key](https://app.zerobounce.net/)
|
|
209
|
-
|
|
210
|
-
""",
|
|
211
|
-
},
|
|
212
49
|
{
|
|
213
50
|
"name": "Agents",
|
|
214
51
|
"description": """
|
|
@@ -251,7 +251,10 @@ class AWSNeptune(ITripleStorePort):
|
|
|
251
251
|
|
|
252
252
|
self.neptune_port = cluster_endpoints[0]["Endpoint"]["Port"]
|
|
253
253
|
|
|
254
|
-
|
|
254
|
+
credentials = self.session.get_credentials()
|
|
255
|
+
if credentials is None:
|
|
256
|
+
raise ValueError("Failed to get credentials from session")
|
|
257
|
+
self.credentials = credentials
|
|
255
258
|
|
|
256
259
|
self.neptune_sparql_url = (
|
|
257
260
|
f"https://{self.neptune_sparql_endpoint}:{self.neptune_port}/sparql"
|
|
@@ -291,6 +294,9 @@ class AWSNeptune(ITripleStorePort):
|
|
|
291
294
|
request = AWSRequest(
|
|
292
295
|
method=method, url=url, data=data, params=params, headers=headers
|
|
293
296
|
)
|
|
297
|
+
assert self.credentials is not None, (
|
|
298
|
+
"Credentials must be set during initialization"
|
|
299
|
+
)
|
|
294
300
|
SigV4Auth(
|
|
295
301
|
self.credentials, "neptune-db", region_name=self.aws_region_name
|
|
296
302
|
).add_auth(request)
|
|
@@ -2,15 +2,17 @@ import copy
|
|
|
2
2
|
import random
|
|
3
3
|
|
|
4
4
|
import pydash as _
|
|
5
|
-
from naas_abi import services
|
|
6
5
|
from rdflib import OWL, RDF, RDFS, Graph, URIRef
|
|
7
6
|
|
|
8
7
|
from naas_abi_core import logger
|
|
8
|
+
from naas_abi_core.services.triple_store.TripleStorePorts import ITripleStoreService
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
class OntologyYaml:
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
__triple_store_service: ITripleStoreService
|
|
13
|
+
|
|
14
|
+
def __init__(self, triple_store_service: ITripleStoreService):
|
|
15
|
+
self.__triple_store_service = triple_store_service
|
|
14
16
|
|
|
15
17
|
@staticmethod
|
|
16
18
|
def rdf_to_yaml(
|
|
@@ -50,7 +52,7 @@ class Translator:
|
|
|
50
52
|
self.mapping_oprop = {}
|
|
51
53
|
|
|
52
54
|
# Init ontology schemas
|
|
53
|
-
consolidated =
|
|
55
|
+
consolidated = self.__triple_store_service.get_schema_graph()
|
|
54
56
|
schema_graph = Graph()
|
|
55
57
|
|
|
56
58
|
# Filter for desired types
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: naas-abi-core
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.4.0
|
|
4
4
|
Summary: Abi framework allowing you to build your AI system.
|
|
5
5
|
Author-email: Maxime Jublou <maxime@naas.ai>, Florent Ravenel <florent@naas.ai>, Jeremy Ravenel <jeremy@naas.ai>
|
|
6
6
|
Requires-Python: <4,>=3.10
|
|
@@ -32,12 +32,14 @@ Requires-Dist: types-paramiko>=4.0.0.20250822
|
|
|
32
32
|
Requires-Dist: types-pyyaml>=6.0.12.20250915
|
|
33
33
|
Requires-Dist: types-tqdm>=4.67.0.20250809
|
|
34
34
|
Provides-Extra: all
|
|
35
|
+
Requires-Dist: boto3-stubs>=1.42.19; extra == 'all'
|
|
35
36
|
Requires-Dist: boto3<2,>=1.38.19; extra == 'all'
|
|
36
37
|
Requires-Dist: langchain-openai>=0.3.35; extra == 'all'
|
|
37
38
|
Requires-Dist: paramiko<4.0.0,>=3.5.1; extra == 'all'
|
|
38
39
|
Requires-Dist: qdrant-client>=1.14.3; extra == 'all'
|
|
39
40
|
Requires-Dist: sshtunnel>=0.4.0; extra == 'all'
|
|
40
41
|
Provides-Extra: aws
|
|
42
|
+
Requires-Dist: boto3-stubs>=1.42.19; extra == 'aws'
|
|
41
43
|
Requires-Dist: boto3<2,>=1.38.19; extra == 'aws'
|
|
42
44
|
Provides-Extra: openrouter
|
|
43
45
|
Requires-Dist: langchain-openai>=0.3.35; extra == 'openrouter'
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
naas_abi_core/__init__.py,sha256=kR93ywABUBo8-tAWCHMbRcCDCJZjqq4hWwxMk3Cr9fI,56
|
|
2
2
|
naas_abi_core/apps/api/api.py,sha256=C11ItO_Xn0qh7ZubZUnQ4-Mts0Cd-Ui_4KEkU2cshqI,7127
|
|
3
3
|
naas_abi_core/apps/api/api_test.py,sha256=7H_VgnbsGqu6oGY-apAHjJr_yjIcGHY0heaEThWBsUk,10537
|
|
4
|
-
naas_abi_core/apps/api/openapi_doc.py,sha256=
|
|
4
|
+
naas_abi_core/apps/api/openapi_doc.py,sha256=q0F8EG1e9bUPWDmK0touHxs4RBnfHD2xhuk-aICv_Ko,4737
|
|
5
5
|
naas_abi_core/apps/mcp/Dockerfile.mcp,sha256=936qaoMFGbMvTARjzkNHMgRfGVWnolpVCrz0fBJYrLA,826
|
|
6
6
|
naas_abi_core/apps/mcp/mcp_server.py,sha256=U-wDl8rswMk4nefGg2SUByw4x8CM10M59FfLHxIKC-o,8391
|
|
7
7
|
naas_abi_core/apps/mcp/mcp_server_test.py,sha256=8jixnDyERM_HjjDTRtPDQcJ_rzA0ESAn147sl2Gk8gw,5636
|
|
@@ -80,7 +80,7 @@ naas_abi_core/services/secret/adaptors/secondary/dotenv_secret_secondaryadaptor.
|
|
|
80
80
|
naas_abi_core/services/triple_store/TripleStoreFactory.py,sha256=4cCWJUhmXo5-yB61fyDwc-pigIYZo_PzmPW_5pY5I-E,4560
|
|
81
81
|
naas_abi_core/services/triple_store/TripleStorePorts.py,sha256=dRhDc5-uiXDZQWzscqUd972EPi_pafPLkj4sXwxF8Xs,6681
|
|
82
82
|
naas_abi_core/services/triple_store/TripleStoreService.py,sha256=X1ty-fH0A1XyLhZpU6oc3h-BgOoarAHSMPzITBBVhlY,16274
|
|
83
|
-
naas_abi_core/services/triple_store/adaptors/secondary/AWSNeptune.py,sha256=
|
|
83
|
+
naas_abi_core/services/triple_store/adaptors/secondary/AWSNeptune.py,sha256=kma8SUufwMkFA_xYaRcjV9jRsZ-UtUUdBlHEmKiMTVw,50222
|
|
84
84
|
naas_abi_core/services/triple_store/adaptors/secondary/AWSNeptune_test.py,sha256=b9LiXwQ3EWem5T_OplJWgXQ-cPwkrfomKO5MQx6zwF4,7662
|
|
85
85
|
naas_abi_core/services/triple_store/adaptors/secondary/Oxigraph.py,sha256=1VXtc-Ew7unmqULTA95nN8gnaYWP0Leb3rKbuWe1vRo,20729
|
|
86
86
|
naas_abi_core/services/triple_store/adaptors/secondary/Oxigraph_test.py,sha256=oVyBHGYsrZn9HpzC4aRBi3w515yU0vXG8Yo1mIZN1hk,57224
|
|
@@ -102,7 +102,7 @@ naas_abi_core/utils/JSON.py,sha256=onIs-E3GWz4fvRuWBQpyb9qRNXCOJPf9x1yV1-jDlqU,1
|
|
|
102
102
|
naas_abi_core/utils/LazyLoader.py,sha256=rWrnFVuKCK1WrtNgeiegT_i7AkxGy9qK2hfhsXV4dCY,1120
|
|
103
103
|
naas_abi_core/utils/Logger.py,sha256=emZwe1EKAWcEegDQGFkr2U8vLX-oDUZXX580o9kP_xc,203
|
|
104
104
|
naas_abi_core/utils/OntologyReasoner.py,sha256=OgDgiymd7HuDI28XZfcS2-9QeR7_jY9o9LWBQu2AU7k,4591
|
|
105
|
-
naas_abi_core/utils/OntologyYaml.
|
|
105
|
+
naas_abi_core/utils/OntologyYaml.py,sha256=YcLC9FyGwwb7WCfV6fyniJFH6HMNfwyBDh6WgQYM3u4,25437
|
|
106
106
|
naas_abi_core/utils/SPARQL.py,sha256=Yjk2INdNIUuv8P26-ToqNik5odyUroybzWvijMsfcns,9313
|
|
107
107
|
naas_abi_core/utils/Storage.py,sha256=XgB8KcYgnF8armlvxJrZbJPcsnPSb8ByNCnVchFMpo4,1205
|
|
108
108
|
naas_abi_core/utils/StorageUtils.py,sha256=WFGuUSe9u44BXLi5JqnVoHEGmWGpZTFUZv1empbe5dU,13654
|
|
@@ -117,7 +117,8 @@ naas_abi_core/utils/onto2py/tests/ttl2py_test.py,sha256=5OZqSxPffjJYiX9T4rT1mV0P
|
|
|
117
117
|
naas_abi_core/workflow/__init__.py,sha256=hZD58mCB1PApxITqftP_xgjxL7NeLvOfI-rJENg1ENs,250
|
|
118
118
|
naas_abi_core/workflow/workflow.py,sha256=ZufSS073JztVl0OQRTqNyK7FepFvv7gXlc4j5FAEZCI,1216
|
|
119
119
|
assets/favicon.ico,sha256=nWk8wrHZiJV3DeuWrP2MqilXxCuoNWKGtMZfYmEVQLw,666
|
|
120
|
-
|
|
121
|
-
naas_abi_core-1.
|
|
122
|
-
naas_abi_core-1.
|
|
123
|
-
naas_abi_core-1.
|
|
120
|
+
assets/logo.png,sha256=zUu9sNgMmtzJhfNCinDs85GP1LDNVfTy8kYLKRT_pxA,9334
|
|
121
|
+
naas_abi_core-1.4.0.dist-info/METADATA,sha256=-dHvZP15mu5wBnRUM9A6cU385cGhffxRMLueNqfWjpw,4092
|
|
122
|
+
naas_abi_core-1.4.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
123
|
+
naas_abi_core-1.4.0.dist-info/entry_points.txt,sha256=IX0WUFxZuo1JU6H66fcRR6y7gYChMVw_XA9suPk9_1Q,70
|
|
124
|
+
naas_abi_core-1.4.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|