-
Notifications
You must be signed in to change notification settings - Fork 844
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
Support set Memory from UI #852
base: main
Are you sure you want to change the base?
Conversation
@bdqfork is attempting to deploy a commit to the Mersenne Team on Vercel. A member of the Team first needs to authorize it. |
I'm not very familiar with SAML, so I don't currently have support for it. I will do later. |
@bdqfork thank you reveiwing and merging in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
overall looks good, I have left some small suggestions.
# Improve grpc error messages | ||
RUN pip install grpcio-status | ||
|
||
COPY . ./ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bdqfork Why did you move this line?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Separating code and environment dependencies allows for optimal utilization of the cache built by Docker. During the debugging phase, there are more changes in the code compared to changes in the environment dependencies.
@@ -120,6 +126,7 @@ model Agent { | |||
updatedAt DateTime @updatedAt | |||
llms AgentLLM[] | |||
llmModel LLMModel? @default(GPT_3_5_TURBO_16K_0613) | |||
memory MemoryDbProvider? @default(MOTORHEAD) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's use memoryDbProvider
:
memory MemoryDbProvider? @default(MOTORHEAD) | |
memoryDbProvider MemoryDbProvider? @default(MOTORHEAD) |
|
||
const redisSchema = z.object({ | ||
REDIS_MEMORY_URL: z.string(), | ||
REDIS_MEMORY_WINDOW: z.string(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's use number
instead of string
key_prefix="superagent:", | ||
), | ||
memory_key="chat_history", | ||
return_messages=True, | ||
output_key="output", | ||
k=config("REDIS_MEMORY_WINDOW", 10), | ||
k=get_first_non_null( | ||
options.get("REDIS_MEMORY_WINDOW"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If one wants to define different REDIS_MEMORY_WINDOW per each agent. We can't achieve it by defining global memory and use it this way. Is it something we should care about? @homanp
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@elisalimli @homanp Perhaps memory_size
could be utilized as an agent argument, representing the number of recent conversations to give priority to. If this value exists, it will be utilized; otherwise, the global configuration will be used.
Summary
Fixes #837
Support set Memory from UI, default is motorhead. However, I found motorhead archived.
Test plan