File tree 3 files changed +25
-1
lines changed
autogpt_libs/autogpt_libs/supabase_integration_credentials_store
3 files changed +25
-1
lines changed Original file line number Diff line number Diff line change 72
72
title = "Use Credits for D-ID" ,
73
73
expires_at = None ,
74
74
)
75
+ jina_credentials = APIKeyCredentials (
76
+ id = "7f26de70-ba0d-494e-ba76-238e65e7b45f" ,
77
+ provider = "jina" ,
78
+ api_key = SecretStr (settings .secrets .jina_api_key ),
79
+ title = "Use Credits for Jina" ,
80
+ expires_at = None ,
81
+ )
82
+
75
83
76
84
DEFAULT_CREDENTIALS = [
77
85
revid_credentials ,
81
89
anthropic_credentials ,
82
90
groq_credentials ,
83
91
did_credentials ,
92
+ jina_credentials ,
84
93
]
85
94
86
95
@@ -124,6 +133,8 @@ def get_all_creds(self, user_id: str) -> list[Credentials]:
124
133
all_credentials .append (anthropic_credentials )
125
134
if settings .secrets .did_api_key :
126
135
all_credentials .append (did_credentials )
136
+ if settings .secrets .jina_api_key :
137
+ all_credentials .append (jina_credentials )
127
138
return all_credentials
128
139
129
140
def get_creds_by_id (self , user_id : str , credentials_id : str ) -> Credentials | None :
Original file line number Diff line number Diff line change 9
9
did_credentials ,
10
10
groq_credentials ,
11
11
ideogram_credentials ,
12
+ jina_credentials ,
12
13
openai_credentials ,
13
14
replicate_credentials ,
14
15
revid_credentials ,
@@ -144,7 +145,18 @@ def __init__(
144
145
},
145
146
)
146
147
],
147
- SearchTheWebBlock : [BlockCost (cost_amount = 1 )],
148
+ SearchTheWebBlock : [
149
+ BlockCost (
150
+ cost_amount = 1 ,
151
+ cost_filter = {
152
+ "credentials" : {
153
+ "id" : jina_credentials .id ,
154
+ "provider" : jina_credentials .provider ,
155
+ "type" : jina_credentials .type ,
156
+ }
157
+ },
158
+ )
159
+ ],
148
160
ExtractWebsiteContentBlock : [
149
161
BlockCost (cost_amount = 1 , cost_filter = {"raw_content" : False })
150
162
],
Original file line number Diff line number Diff line change @@ -266,6 +266,7 @@ class Secrets(UpdateTrackingModel["Secrets"], BaseSettings):
266
266
replicate_api_key : str = Field (default = "" , description = "Replicate API Key" )
267
267
unreal_speech_api_key : str = Field (default = "" , description = "Unreal Speech API Key" )
268
268
ideogram_api_key : str = Field (default = "" , description = "Ideogram API Key" )
269
+ jina_api_key : str = Field (default = "" , description = "Jina API Key" )
269
270
270
271
# Add more secret fields as needed
271
272
You can’t perform that action at this time.
0 commit comments