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

if client is passed as a parameter, other fields should be optional #816

Open
1 task done
vachillo opened this issue Jun 3, 2024 · 0 comments
Open
1 task done
Labels
bug Something isn't working

Comments

@vachillo
Copy link
Member

vachillo commented Jun 3, 2024

Describe the bug
if a client parameter is passed in any class that has one, the other fields that are parameters solely for the internal client instantiation should not be required.

To Reproduce
Steps to reproduce the behavior:

RedisConversationMemoryDriver(
            client=Redis.from_url(f"rediss://{os.environ['REDIS_USERNAME']}:{os.environ['REDIS_PASSWORD']}@{os.environ['REDIS_HOST']}:{os.environ['REDIS_PORT']}"),
            index="index",
            # if host, port, or password are not defined, the driver will fail init, even though the client is defined above
            host=os.environ["REDIS_HOST"],
            port=os.environ["REDIS_PORT"],
            password=os.environ['REDIS_PASSWORD'],
            conversation_id=conversation_id,
        ),

Expected behavior
if client is passed in, other fields that are used only for building the client internally should not be required.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Version [e.g. 0.5.1]

Additional context
Add any other context about the problem here.

@vachillo vachillo added the bug Something isn't working label Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant