Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redis-dataprep: Make Redis connection consistent #359

Merged
merged 2 commits into from
Jul 30, 2024

Conversation

bjzhjing
Copy link
Contributor

There are both 'from langchain_community.vectorstores import Redis' and 'import redis' in prepare_doc_redis.py. Redis.from_texts_return_keys() is with REDIS_URL as connection, while redis.Redis() takes the combination of REDIS_HOST and REDIS_PORT as connection. When the former and the latter are not the same, it will fail to get data from vector database. Change to use REDIS_URL as the unified way.

Description

The summary of the proposed changes as long as the relevant motivation and context.

Issues

tofix: #358

Type of change

List the type of change like below. Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds new functionality)
  • Breaking change (fix or feature that would break existing design and interface)
  • Others (enhancement, documentation, validation, etc.)

Dependencies

n/a

Tests

Verify by 'kubectl apply -f chatqna.yaml' and then follow custome API to check Upload/Get/Delete APIs.

There are both 'from langchain_community.vectorstores import Redis' and
'import redis' in prepare_doc_redis.py. Redis.from_texts_return_keys()
is with REDIS_URL as connection, while redis.Redis() takes the
combination of REDIS_HOST and REDIS_PORT as connection. When the former
and the latter are not the same, it will fail to get data from vector
database. Change to use REDIS_URL as the unified way.

Signed-off-by: Cathy Zhang <[email protected]>
@letonghan
Copy link
Collaborator

Please fix the confict with main branch

@Spycsh Spycsh requested review from Spycsh and letonghan July 30, 2024 08:42
@Spycsh Spycsh merged commit cfaf5f0 into opea-project:main Jul 30, 2024
7 checks passed
sharanshirodkar7 pushed a commit to predictionguard/pg-GenAIComps that referenced this pull request Aug 6, 2024
There are both 'from langchain_community.vectorstores import Redis' and
'import redis' in prepare_doc_redis.py. Redis.from_texts_return_keys()
is with REDIS_URL as connection, while redis.Redis() takes the
combination of REDIS_HOST and REDIS_PORT as connection. When the former
and the latter are not the same, it will fail to get data from vector
database. Change to use REDIS_URL as the unified way.

Signed-off-by: Cathy Zhang <[email protected]>
Co-authored-by: Sihan Chen <[email protected]>
Signed-off-by: sharanshirodkar7 <[email protected]>
sharanshirodkar7 pushed a commit to predictionguard/pg-GenAIComps that referenced this pull request Aug 7, 2024
There are both 'from langchain_community.vectorstores import Redis' and
'import redis' in prepare_doc_redis.py. Redis.from_texts_return_keys()
is with REDIS_URL as connection, while redis.Redis() takes the
combination of REDIS_HOST and REDIS_PORT as connection. When the former
and the latter are not the same, it will fail to get data from vector
database. Change to use REDIS_URL as the unified way.

Signed-off-by: Cathy Zhang <[email protected]>
Co-authored-by: Sihan Chen <[email protected]>
Signed-off-by: sharanshirodkar7 <[email protected]>
BaoHuiling pushed a commit to siddhivelankar23/GenAIComps that referenced this pull request Aug 15, 2024
There are both 'from langchain_community.vectorstores import Redis' and
'import redis' in prepare_doc_redis.py. Redis.from_texts_return_keys()
is with REDIS_URL as connection, while redis.Redis() takes the
combination of REDIS_HOST and REDIS_PORT as connection. When the former
and the latter are not the same, it will fail to get data from vector
database. Change to use REDIS_URL as the unified way.

Signed-off-by: Cathy Zhang <[email protected]>
Co-authored-by: Sihan Chen <[email protected]>
Signed-off-by: BaoHuiling <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants