-
Notifications
You must be signed in to change notification settings - Fork 589
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
add chat-history example. #297
Conversation
Signed-off-by: Tomoya Fujita <[email protected]>
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.
This works like the following.
>python3 examples/chat-history/main.py
type '/exit' to quit, '/history' to dump message history.
>>> hello
Hello! How can I assist you today?
>>> how can I say hello in Japanese?
In Japanese, there are a few ways to say "hello," depending on the time of day and the level of formality. Here are some common ones:
* **Konnichiwa** (Hello!): This is the standard greeting for most situations.
* **Ohayou gozaimasu** (Good morning!): Used until around 5 pm.
* **Konbanwa** (Good evening!): Used from around 5 pm to 10 pm.
* **Oyasumi nasai** (Goodnight!): Used for saying goodnight.
If you want to be more casual, you can use:
* **Konnichiwa** (same as above)
* **Heya** or **Hai** (casual greeting, like "hi" in English)
Keep in mind that the level of formality depends on the situation and who you're addressing. If you're speaking to someone with a higher status or in a formal setting, it's better to use more formal language.
How was that? Do you want to practice saying these phrases?
>>> what is appropriate one in social scene?
In a casual social scene, like meeting friends at a restaurant, going out with colleagues, or attending a party, the most suitable greeting would be:
**Konnichiwa** (Hello!)
This is a standard and friendly way to greet someone in a relaxed setting. You can also use the more casual version:
* **Heya** or **Hai** (Casual greeting, like "hi" in English)
In some cases, you might even see younger people using:
* **Ohayou gozaimasu** (Good morning!) or **Konbanwa** (Good evening!), but only if it's before 5 pm and the atmosphere is still fairly formal.
However, if you're attending a more formal event, like a wedding, a business conference, or meeting someone who holds a high social status, it's better to use:
* **Ohayou gozaimasu** (Good morning!) or **Konbanwa** (Good evening!), depending on the time of day.
In general, in a casual social scene, **Konnichiwa** is a safe and friendly choice!
Do you want to try saying it?
>>> /history
[{'role': 'user', 'content': 'hello'}, {'role': 'assistant', 'content': 'Hello! How can I assist you today?'}, {'role': 'user', 'content': 'how can I say hello in Japanese?'}, {'role': 'assistant', 'content': 'In Japanese, there are a few ways to say "hello," depending on the time of day and the level of formality. Here are some common ones:\n\n* **Konnichiwa** (Hello!): This is the standard greeting for most situations.\n* **Ohayou gozaimasu** (Good morning!): Used until around 5 pm.\n* **Konbanwa** (Good evening!): Used from around 5 pm to 10 pm.\n* **Oyasumi nasai** (Goodnight!): Used for saying goodnight.\n\nIf you want to be more casual, you can use:\n\n* **Konnichiwa** (same as above)\n* **Heya** or **Hai** (casual greeting, like "hi" in English)\n\nKeep in mind that the level of formality depends on the situation and who you\'re addressing. If you\'re speaking to someone with a higher status or in a formal setting, it\'s better to use more formal language.\n\nHow was that? Do you want to practice saying these phrases?'}, {'role': 'user', 'content': 'what is appropriate one in social scene?'}, {'role': 'assistant', 'content': 'In a casual social scene, like meeting friends at a restaurant, going out with colleagues, or attending a party, the most suitable greeting would be:\n\n**Konnichiwa** (Hello!)\n\nThis is a standard and friendly way to greet someone in a relaxed setting. You can also use the more casual version:\n\n* **Heya** or **Hai** (Casual greeting, like "hi" in English)\n\nIn some cases, you might even see younger people using:\n\n* **Ohayou gozaimasu** (Good morning!) or **Konbanwa** (Good evening!), but only if it\'s before 5 pm and the atmosphere is still fairly formal.\n\nHowever, if you\'re attending a more formal event, like a wedding, a business conference, or meeting someone who holds a high social status, it\'s better to use:\n\n* **Ohayou gozaimasu** (Good morning!) or **Konbanwa** (Good evening!), depending on the time of day.\n\nIn general, in a casual social scene, **Konnichiwa** is a safe and friendly choice!\n\nDo you want to try saying it?'}]
>>> /exit
I'm looking for a way to deploy my llm model with FastApi in production using Ngnix or Kubernetes. I'm confused how I can create a docker image is I need additional changes or it's normal? Please anyone here can guide me in this? |
Thanks @fujitatomoya! Will integrate something similar into #329 |
closes #70