Unique ID
Last updated
Was this helpful?
Last updated
Was this helpful?
Was this helpful?
Unique ID is part of AI response endpoint. It is used to create a new session for a specific user. What does that mean? Read next.
So, when you create a new session with an uid
or unique ID, It actually stores your data you tell the bot in that ID so bot will remember your name etc. You can use the ID later and bot will remember you.
The unique ID can be anything, you should use secure unique IDs. Use utils.generate_unique_id()
method to create a strong unique ID.
Hard to explain right? Here is an example
The bot will respond with something like "What is your name?" and then when you will tell your name, it will remember it in ID: a very unique id
. It will remember all the things you tell until you change the ID.
import randomstuff
client = randomstuff.Client(api_key="api-key")
response = client.get_ai_response("What is my name?",
uid="a very unique id",
)
print(response)