feat: add env support for Astra Db components (#3908)
* add env support for Astra Db components * [autofix.ci] apply automated fixes * use parse_api_endpoint * [autofix.ci] apply automated fixes * [autofix.ci] apply automated fixes * quick cleanup * merge * package lock * reset templates --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
ef11e98c8f
commit
e1816246b5
3 changed files with 6 additions and 0 deletions
|
|
@ -1,5 +1,7 @@
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
from astrapy.admin import parse_api_endpoint
|
||||||
|
|
||||||
from langflow.base.memory.model import LCChatMemoryComponent
|
from langflow.base.memory.model import LCChatMemoryComponent
|
||||||
from langflow.field_typing import BaseChatMessageHistory
|
from langflow.field_typing import BaseChatMessageHistory
|
||||||
from langflow.inputs import MessageTextInput, SecretStrInput, StrInput
|
from langflow.inputs import MessageTextInput, SecretStrInput, StrInput
|
||||||
|
|
@ -62,5 +64,6 @@ class AstraDBChatMemory(LCChatMemoryComponent):
|
||||||
token=self.token,
|
token=self.token,
|
||||||
api_endpoint=self.api_endpoint,
|
api_endpoint=self.api_endpoint,
|
||||||
namespace=self.namespace or None,
|
namespace=self.namespace or None,
|
||||||
|
environment=parse_api_endpoint(self.api_endpoint).environment,
|
||||||
)
|
)
|
||||||
return memory
|
return memory
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
from astrapy.admin import parse_api_endpoint
|
||||||
from loguru import logger
|
from loguru import logger
|
||||||
|
|
||||||
from langflow.base.vectorstores.model import LCVectorStoreComponent, check_cached_vector_store
|
from langflow.base.vectorstores.model import LCVectorStoreComponent, check_cached_vector_store
|
||||||
|
|
@ -397,6 +398,7 @@ class AstraVectorStoreComponent(LCVectorStoreComponent):
|
||||||
"token": self.token,
|
"token": self.token,
|
||||||
"api_endpoint": self.api_endpoint,
|
"api_endpoint": self.api_endpoint,
|
||||||
"namespace": self.namespace or None,
|
"namespace": self.namespace or None,
|
||||||
|
"environment": parse_api_endpoint(self.api_endpoint).environment,
|
||||||
"metric": self.metric or None,
|
"metric": self.metric or None,
|
||||||
"batch_size": self.batch_size or None,
|
"batch_size": self.batch_size or None,
|
||||||
"bulk_insert_batch_concurrency": self.bulk_insert_batch_concurrency or None,
|
"bulk_insert_batch_concurrency": self.bulk_insert_batch_concurrency or None,
|
||||||
|
|
|
||||||
1
src/frontend/package-lock.json
generated
1
src/frontend/package-lock.json
generated
|
|
@ -858,6 +858,7 @@
|
||||||
},
|
},
|
||||||
"node_modules/@clack/prompts/node_modules/is-unicode-supported": {
|
"node_modules/@clack/prompts/node_modules/is-unicode-supported": {
|
||||||
"version": "1.3.0",
|
"version": "1.3.0",
|
||||||
|
"extraneous": true,
|
||||||
"inBundle": true,
|
"inBundle": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"engines": {
|
"engines": {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue