griptape
griptape copied to clipboard
if `client` is passed as a parameter, other fields should be optional
- [x] I have read and agree to the contributing guidelines.
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.