Replies: 1 comment 3 replies
-
To resolve the deprecation warning and correctly pass the arguments during initialization when using the confluence_url = config.get("confluence_url", None)
username = config.get("username", None)
api_key = config.get("api_key", None)
space_keys = config.get("space_key", None) # Assuming this is a list of space keys
documents = []
embedding = OpenAIEmbeddings()
# Initialize the ConfluenceLoader with all required parameters
loader = ConfluenceLoader(
url=confluence_url,
username=username,
api_key=api_key,
limit=100 # Set the limit here
)
for space_key in space_keys:
loader.space_key = space_key # Set the space_key for each iteration
documents.extend(loader.load())
text_splitter = CharacterTextSplitter(
chunk_size=6000, chunk_overlap=50
)
texts = text_splitter.split_documents(documents)
text_splitter = TokenTextSplitter(
chunk_size=1000, chunk_overlap=10, encoding_name="cl100k_base"
)
texts = text_splitter.split_documents(texts)
PGVector.from_texts(
embedding=embedding,
texts=texts,
collection_name=persist_directory,
connection_string=CONNECTION_STRING,
) By passing the |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Checked other resources
Commit to Help
Example Code
Description
getting following error:
Received runtime arguments {'space_key': 'CLI0', 'limit': 100}. Passing runtime args to
load
is deprecated. Please pass arguments during initialization instead.System Info
langchain
ubuntu
Beta Was this translation helpful? Give feedback.
All reactions