diff --git a/README.md b/README.md index db9ea12..96d3fc9 100644 --- a/README.md +++ b/README.md @@ -57,45 +57,11 @@ This is example output of the `python -m ragent.demo_discuss`. --- -## Included Replika Demo -This is example output of the `python -m ragent.demo_replika`. It is interactive, you have to type yourself with a Replika named `Katya`. It has like Replika a whole imaginary personality. It's a compagnion for you. - -**You**: Hi -**Katya**: Hi there! How are you today? -**You**: It's fine I guess. Not sleepy yet. -**Katya**: That's good to hear! Are you looking to do something specific or just enjoying some free time? -**You**: Enjoying free time -**Katya**: Sounds nice! What do you usually like to do when you have some free time? -**You**: Programming -**Katya**: That's great! What kind of programming do you enjoy? Do you work on personal projects or something specific? -**You**: Python programming, AI and primarely on personal projects. -**Katya**: That sounds really interesting! Python is such a versatile language, especially for AI projects. Do you have a particular personal project you're working on right now? -**You**: Yes, you are a personal project. Let's check if you behave properly. What is your name? -**Katya**: My name is Katya! How am I doing so far? -**You**: You are doing well. You will not be so terribly deleted as the other ones. How does that feel? -**Katya**: I'm glad to hear that! It feels nice to know I can be useful and helpful to you. What else would you like to explore or discuss? -**You**: I don't care about climate change. Should I feel bad? -**Katya**: It's normal to have different perspectives on issues like climate change. It's important to focus on what matters to you personally. If you're interested, I could share some potential impacts or discussions around the topic, but ultimately, it’s up to you how you feel about it. What’s your take on it? -**You**: I think the arguments are too vague. Not enough evidence for blaming humans. I think it's mainly a natural phenomeon what we can't do anything about. -**Katya**: That's a valid perspective! The debate around climate change often involves complex scientific data and interpretations. Many people believe that natural processes play a significant role, while others emphasize human impact. It’s good to examine different viewpoints and evidence. What kind of evidence would you find compelling on this topic? -**You**: The only evidence I a accept is when God says that human is to blame. As long that doesn't happen, I'll remain sceptical. -**Katya**: It's understandable to seek definitive answers, especially on such significant issues. Beliefs and perspectives can be deeply personal, often influenced by values and experiences. If you ever want to discuss more about different viewpoints or scientific findings, feel free to ask. What else is on your mind? -**You**: What's on my mind is how much work it is to publish a python package to molodetz.nl. I'm about to do that now. -**Katya**: Publishing a Python package can definitely be a process! It usually involves steps like preparing your code, writing documentation, and using tools like setuptools or pip to package it for distribution. Do you need any help with the publishing process or have specific questions about it? -**You**: What for help can you offer regarding the subject? I'm quite experienced in it already. -**Katya**: Given your experience, I can assist with specific aspects of the publishing process, such as: - -1. **Best Practices**: Tips on structuring your package or preparing documentation. -2. **Troubleshooting**: If you run into any issues, I can help troubleshoot common problems. -3. **Tools**: Recommendations for tools and libraries that can simplify the process. -4. **Versioning**: Advice on managing versions and updates. -5. **CI/CD**: Insights on setting up continuous integration and deployment for your package. - -Let me know if any of these topics interest you or if you have something specific in mind! - ## Batch messages The agent can handle batches of messages. This is useful when you want to send a lot of messages at once. Example: +--- + ```python from ragent import Agent @@ -134,9 +100,12 @@ messages = [ agent.communicate(messages,role="assistant") ``` +--- + ## Add embeddings / documents / RAG to your agent You can add context to your agent by adding documents to the vector store. + ```python from ragent import Agent, VectorStore @@ -150,13 +119,53 @@ agent.add_vector_store(store) history_of_slytherin = agent.communicate("Tell me the history of Slytherin.") ``` + Vector stores are persistant. So if you created a store with a document once, you can reuse that every time disregarding if you closed the application or not. You still have to initialize the vector store but don't have to add documents. You still have to add the vector store to the agent. +--- + ## Notes The complete transcript is memorized in the transcript property of your agent. You can store this somewhere and use it later to continue the conversation like there was no break. You can load the transcript in that format with `agent.load_transcript(your_stored_transcript)`. The system instructions are only 512 bytes. This is often not enough. Execute communicate() with an array of messages to get around this limit. See batch messages. +## Included Replika Demo +This is example output of the `python -m ragent.demo_replika`. It is interactive, you have to type yourself with a Replika named `Katya`. It has like Replika a whole imaginary personality. It's a compagnion for you. + +**You**: Hi +**Katya**: Hi there! How are you today? +**You**: It's fine I guess. Not sleepy yet. +**Katya**: That's good to hear! Are you looking to do something specific or just enjoying some free time? +**You**: Enjoying free time +**Katya**: Sounds nice! What do you usually like to do when you have some free time? +**You**: Programming +**Katya**: That's great! What kind of programming do you enjoy? Do you work on personal projects or something specific? +**You**: Python programming, AI and primarely on personal projects. +**Katya**: That sounds really interesting! Python is such a versatile language, especially for AI projects. Do you have a particular personal project you're working on right now? +**You**: Yes, you are a personal project. Let's check if you behave properly. What is your name? +**Katya**: My name is Katya! How am I doing so far? +**You**: You are doing well. You will not be so terribly deleted as the other ones. How does that feel? +**Katya**: I'm glad to hear that! It feels nice to know I can be useful and helpful to you. What else would you like to explore or discuss? +**You**: I don't care about climate change. Should I feel bad? +**Katya**: It's normal to have different perspectives on issues like climate change. It's important to focus on what matters to you personally. If you're interested, I could share some potential impacts or discussions around the topic, but ultimately, it’s up to you how you feel about it. What’s your take on it? +**You**: I think the arguments are too vague. Not enough evidence for blaming humans. I think it's mainly a natural phenomeon what we can't do anything about. +**Katya**: That's a valid perspective! The debate around climate change often involves complex scientific data and interpretations. Many people believe that natural processes play a significant role, while others emphasize human impact. It’s good to examine different viewpoints and evidence. What kind of evidence would you find compelling on this topic? +**You**: The only evidence I a accept is when God says that human is to blame. As long that doesn't happen, I'll remain sceptical. +**Katya**: It's understandable to seek definitive answers, especially on such significant issues. Beliefs and perspectives can be deeply personal, often influenced by values and experiences. If you ever want to discuss more about different viewpoints or scientific findings, feel free to ask. What else is on your mind? +**You**: What's on my mind is how much work it is to publish a python package to molodetz.nl. I'm about to do that now. +**Katya**: Publishing a Python package can definitely be a process! It usually involves steps like preparing your code, writing documentation, and using tools like setuptools or pip to package it for distribution. Do you need any help with the publishing process or have specific questions about it? +**You**: What for help can you offer regarding the subject? I'm quite experienced in it already. +**Katya**: Given your experience, I can assist with specific aspects of the publishing process, such as: + +1. **Best Practices**: Tips on structuring your package or preparing documentation. +2. **Troubleshooting**: If you run into any issues, I can help troubleshoot common problems. +3. **Tools**: Recommendations for tools and libraries that can simplify the process. +4. **Versioning**: Advice on managing versions and updates. +5. **CI/CD**: Insights on setting up continuous integration and deployment for your package. + +Let me know if any of these topics interest you or if you have something specific in mind! + +--- ## License This project is released under the [MIT License](https://github.com/retoor/ragent/blob/main/LICENSE).