-
Notifications
You must be signed in to change notification settings - Fork 37
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
How to use this code with sessions and responses on previous requests #68
Comments
Hey @AkiraShiro, the code example should have what you're looking for. Are you having trouble understanding it? Do you need an explanation? Please let us know so we can better help you! I am also using this library for one of my projects, so I have some knowledge of this library! original code example
here below is my take on the code example:
|
Hi @eforce67. Thank you for your decision, but unfortunately it was not a worker. It is easy to check if used print(GPT4_response['item']['throttling']['numUserMessagesInConversation']) (taken from your example). When sending a request, the number of messages already used for the session is issued, using your code the value is always 1. example code:
|
Oh I see, so the value isn't changing for numUserMessagesInConversation? I'll try to see a workaround for this. |
Hi @AkiraShiro I had a quick look an it seems that the async def main() -> None:
async with SydneyClient() as sydney:
response = await sydney.ask("What does this picture show?", attachment=url)
print(response) # Will describe a photo of a golden retriever.
response = await sydney.ask(
"Can you tell me something interesting about it?", attachment=url
)
print(response)
response = await sydney.compose(
prompt="Why they are a great pet",
format="ideas",
)
print(response) I went through this with a debugger and saw that in the end {
"maxNumLongDocSummaryUserMessagesInConversation": 50,
"maxNumUserMessagesInConversation": 30,
"numLongDocSummaryUserMessagesInConversation": 0,
"numUserMessagesInConversation": 3
} I haven't tested myself the above code, but I see that |
Hi @vsakkas. Yes, I’m trying to find a way to record a telegram user so that he can use a separate session, but my attempts led to the reset of the session after sending the next message. It would be nice if you added instructions to your session code upd. This my code with create session
|
I tried to figure it out but it didn’t work out, I ask for help
The text was updated successfully, but these errors were encountered: