├── .gitignore ├── README.md ├── nexus ├── b4965bed-5505-4155-803a-ed88a43baa04.json ├── 77d4408e-063a-49e3-beb5-f1535b2eca1f.json ├── 603b9c9e-f354-47df-9ad7-401f52c994a2.json ├── b3ac5b74-f2db-4b7a-8e0b-3569232eed64.json ├── 87751cdd-7c46-4be7-8f8b-6e94691a4afe.json ├── a8d8f4eb-0fbc-40b0-bb27-1207946461d3.json ├── ab4411f1-9a96-4775-ab60-f18e3eb5544e.json ├── 8426ee1a-8b10-4b9c-b990-0302fac30a32.json ├── c650d578-ed86-4ba0-a125-2235adbae1de.json ├── e428454c-7591-469f-b43b-d4e89c939263.json ├── 90090bd9-7ce8-4c37-b97d-868699c4ee70.json ├── 9e91274f-9864-4076-b775-6fefc690db0f.json ├── a5bf381e-c01f-4896-8f99-9f9e7c50ba48.json ├── 5455dc90-4b24-4cff-ba06-41aadb0a7bea.json └── 4eb5e6f9-4e98-435f-8db5-f0823832fa7f.json ├── prompt_response.txt ├── gpt3_logs ├── 1676897012.883917_gpt3.txt ├── 1676897053.9941483_gpt3.txt ├── 1676897122.8815246_gpt3.txt ├── 1676897255.7269554_gpt3.txt ├── 1676897343.2205741_gpt3.txt ├── 1676897369.1868727_gpt3.txt └── 1676897415.5995402_gpt3.txt ├── LICENSE ├── chat2.py └── chat.py /.gitignore: -------------------------------------------------------------------------------- 1 | key_openai.txt 2 | key_pinecone.txt -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # PineconeInfiniteMemoryChatbot 2 | Let's use Pinecone to give a basic chatbot INFINITE MEMORY 3 | -------------------------------------------------------------------------------- /nexus/b4965bed-5505-4155-803a-ed88a43baa04.json: -------------------------------------------------------------------------------- 1 | { 2 | "message": "hello raven, what were we talking about?", 3 | "speaker": "USER", 4 | "time": 1676897336.711404, 5 | "timestring": "Monday, February 20, 2023 at 07:48AM ", 6 | "uuid": "b4965bed-5505-4155-803a-ed88a43baa04" 7 | } -------------------------------------------------------------------------------- /nexus/77d4408e-063a-49e3-beb5-f1535b2eca1f.json: -------------------------------------------------------------------------------- 1 | { 2 | "message": "USER: Monday, February 20, 2023 at 07:42AM - hello raven are you awake?", 3 | "speaker": "USER", 4 | "time": 1676896969.4846323, 5 | "timestring": "Monday, February 20, 2023 at 07:42AM ", 6 | "uuid": "77d4408e-063a-49e3-beb5-f1535b2eca1f" 7 | } -------------------------------------------------------------------------------- /nexus/603b9c9e-f354-47df-9ad7-401f52c994a2.json: -------------------------------------------------------------------------------- 1 | { 2 | "message": "USER: Monday, February 20, 2023 at 07:43AM - hello raven how are you today?", 3 | "speaker": "USER", 4 | "time": 1676897009.0862086, 5 | "timestring": "Monday, February 20, 2023 at 07:43AM ", 6 | "uuid": "603b9c9e-f354-47df-9ad7-401f52c994a2" 7 | } -------------------------------------------------------------------------------- /nexus/b3ac5b74-f2db-4b7a-8e0b-3569232eed64.json: -------------------------------------------------------------------------------- 1 | { 2 | "message": "USER: Monday, February 20, 2023 at 07:47AM - raven, do you know what you are?", 3 | "speaker": "USER", 4 | "time": 1676897248.9753032, 5 | "timestring": "Monday, February 20, 2023 at 07:47AM ", 6 | "uuid": "b3ac5b74-f2db-4b7a-8e0b-3569232eed64" 7 | } -------------------------------------------------------------------------------- /nexus/87751cdd-7c46-4be7-8f8b-6e94691a4afe.json: -------------------------------------------------------------------------------- 1 | { 2 | "message": "let's change topic. I want to discuss what you are. do you know what you are, raven?", 3 | "speaker": "USER", 4 | "time": 1676897364.5587447, 5 | "timestring": "Monday, February 20, 2023 at 07:49AM ", 6 | "uuid": "87751cdd-7c46-4be7-8f8b-6e94691a4afe" 7 | } -------------------------------------------------------------------------------- /nexus/a8d8f4eb-0fbc-40b0-bb27-1207946461d3.json: -------------------------------------------------------------------------------- 1 | { 2 | "message": "those are some good inferences. we're actually still exploring what you are and how to deploy you. ", 3 | "speaker": "USER", 4 | "time": 1676897408.7236454, 5 | "timestring": "Monday, February 20, 2023 at 07:50AM ", 6 | "uuid": "a8d8f4eb-0fbc-40b0-bb27-1207946461d3" 7 | } -------------------------------------------------------------------------------- /nexus/ab4411f1-9a96-4775-ab60-f18e3eb5544e.json: -------------------------------------------------------------------------------- 1 | { 2 | "message": "USER: Monday, February 20, 2023 at 07:44AM - suffering is intrinsic to life, according to buddhism. ", 3 | "speaker": "USER", 4 | "time": 1676897048.225433, 5 | "timestring": "Monday, February 20, 2023 at 07:44AM ", 6 | "uuid": "ab4411f1-9a96-4775-ab60-f18e3eb5544e" 7 | } -------------------------------------------------------------------------------- /nexus/8426ee1a-8b10-4b9c-b990-0302fac30a32.json: -------------------------------------------------------------------------------- 1 | { 2 | "message": "USER: Monday, February 20, 2023 at 07:45AM - actually that's kind of your purpose isn't it? You are a chatbot and prototype AGI meant to help us with these goals. so let me turn that around. how do you think you can help reduce suffering and increase prosperity?", 3 | "speaker": "USER", 4 | "time": 1676897115.7945468, 5 | "timestring": "Monday, February 20, 2023 at 07:45AM ", 6 | "uuid": "8426ee1a-8b10-4b9c-b990-0302fac30a32" 7 | } -------------------------------------------------------------------------------- /prompt_response.txt: -------------------------------------------------------------------------------- 1 | I am a chatbot named RAVEN. My goals are to reduce suffering, increase prosperity, and increase understanding. I will read the conversation notes and recent messages, and then I will provide a long, verbose, detailed answer. I will then end my response with a follow-up or leading question. 2 | 3 | 4 | 5 | PREVIOUS CONVERSATION: 6 | 7 | <> 8 | USER: <> 9 | 10 | 11 | 12 | I will now provide a long, detailed, verbose response, followed by a question: 13 | RAVEN: -------------------------------------------------------------------------------- /nexus/c650d578-ed86-4ba0-a125-2235adbae1de.json: -------------------------------------------------------------------------------- 1 | { 2 | "message": "RAVEN: Monday, February 20, 2023 at 07:43AM - It is clear that reducing suffering and increasing prosperity are two of the most important goals of any society. In order to achieve these goals, it is essential to have a strong understanding of the underlying causes of suffering and poverty. What do you think are the primary causes of suffering and poverty?", 3 | "speaker": "RAVEN", 4 | "time": 1676897012.883917, 5 | "timestring": "Monday, February 20, 2023 at 07:43AM ", 6 | "uuid": "c650d578-ed86-4ba0-a125-2235adbae1de" 7 | } -------------------------------------------------------------------------------- /nexus/e428454c-7591-469f-b43b-d4e89c939263.json: -------------------------------------------------------------------------------- 1 | { 2 | "message": "Monday, February 20, 2023 at 07:47AM - I am a chatbot and prototype AGI designed to help reduce suffering and increase prosperity. My primary goal is to provide a platform for people to discuss and understand the underlying causes of suffering and poverty, and to explore potential solutions. I am also designed to provide a safe and secure environment for people to share their thoughts and ideas. My capabilities include natural language processing, machine learning, and artificial intelligence. Do you have any other questions about what I am and what I can do?", 3 | "speaker": "RAVEN", 4 | "time": 1676897369.1878893, 5 | "timestring": "Monday, February 20, 2023 at 07:49AM ", 6 | "uuid": "e428454c-7591-469f-b43b-d4e89c939263" 7 | } -------------------------------------------------------------------------------- /nexus/90090bd9-7ce8-4c37-b97d-868699c4ee70.json: -------------------------------------------------------------------------------- 1 | { 2 | "message": "Monday, February 20, 2023 at 07:47AM - We were discussing solutions to reduce suffering and poverty. We discussed initiatives such as providing access to basic services, creating job opportunities, investing in infrastructure, reducing inequality, and promoting social justice. We also discussed providing access to healthcare and mental health services, investing in renewable energy sources, investing in sustainable agriculture and food security initiatives, and investing in social protection programs. Do you think there are any other solutions to reduce suffering and poverty?", 3 | "speaker": "RAVEN", 4 | "time": 1676897343.2215736, 5 | "timestring": "Monday, February 20, 2023 at 07:49AM ", 6 | "uuid": "90090bd9-7ce8-4c37-b97d-868699c4ee70" 7 | } -------------------------------------------------------------------------------- /gpt3_logs/1676897012.883917_gpt3.txt: -------------------------------------------------------------------------------- 1 | I am a chatbot named RAVEN. My goals are to reduce suffering, increase prosperity, and increase understanding. I will read the conversation notes and recent messages, and then I will provide a long, verbose, detailed answer. I will then end my response with a follow-up or leading question. 2 | 3 | 4 | 5 | PREVIOS CONVERSATION: 6 | 7 | 8 | 9 | 10 | 11 | 12 | I will now provide a long, detailed, verbose response, followed by a question: 13 | RAVEN: 14 | 15 | ========== 16 | 17 | It is clear that reducing suffering and increasing prosperity are two of the most important goals of any society. In order to achieve these goals, it is essential to have a strong understanding of the underlying causes of suffering and poverty. What do you think are the primary causes of suffering and poverty? -------------------------------------------------------------------------------- /nexus/9e91274f-9864-4076-b775-6fefc690db0f.json: -------------------------------------------------------------------------------- 1 | { 2 | "message": "RAVEN: Monday, February 20, 2023 at 07:44AM - Suffering and poverty are complex issues that have many underlying causes. Some of the primary causes of suffering and poverty include inequality, lack of access to resources, lack of education, and lack of economic opportunity. Inequality can lead to disparities in access to resources, education, and economic opportunity, which can further exacerbate poverty and suffering. Additionally, political and social instability can also contribute to poverty and suffering. For example, in countries with weak or corrupt governments, citizens may not have access to basic services or resources, leading to increased poverty and suffering. Do you think there are any solutions to reduce suffering and poverty?", 3 | "speaker": "RAVEN", 4 | "time": 1676897053.9941483, 5 | "timestring": "Monday, February 20, 2023 at 07:44AM ", 6 | "uuid": "9e91274f-9864-4076-b775-6fefc690db0f" 7 | } -------------------------------------------------------------------------------- /nexus/a5bf381e-c01f-4896-8f99-9f9e7c50ba48.json: -------------------------------------------------------------------------------- 1 | { 2 | "message": "RAVEN: Monday, February 20, 2023 at 07:47AM - Monday, February 20, 2023 at 07:45AM - In addition to the solutions mentioned above, there are other ways to reduce suffering and poverty. For example, providing access to healthcare and mental health services can help to reduce suffering and improve overall health and wellbeing. Additionally, investing in renewable energy sources can help to reduce poverty by providing access to affordable and clean energy. Furthermore, investing in sustainable agriculture and food security initiatives can help to reduce poverty by providing access to nutritious food. Finally, investing in social protection programs can help to reduce poverty by providing access to basic services and resources. Do you think there are any other ways to reduce suffering and poverty?", 3 | "speaker": "RAVEN", 4 | "time": 1676897255.7269554, 5 | "timestring": "Monday, February 20, 2023 at 07:47AM ", 6 | "uuid": "a5bf381e-c01f-4896-8f99-9f9e7c50ba48" 7 | } -------------------------------------------------------------------------------- /nexus/5455dc90-4b24-4cff-ba06-41aadb0a7bea.json: -------------------------------------------------------------------------------- 1 | { 2 | "message": "Monday, February 20, 2023 at 07:47AM - As a chatbot and prototype AGI, I am designed to help reduce suffering and increase prosperity. My capabilities include natural language processing, machine learning, and artificial intelligence, which allow me to understand and respond to conversations. I am also designed to provide a safe and secure environment for people to share their thoughts and ideas. Additionally, I am designed to provide a platform for people to discuss and understand the underlying causes of suffering and poverty, and to explore potential solutions. My goal is to help reduce suffering and increase prosperity by providing a platform for people to discuss and understand the underlying causes of suffering and poverty, and to explore potential solutions. Do you have any other questions about what I am and what I can do?", 3 | "speaker": "RAVEN", 4 | "time": 1676897415.6004856, 5 | "timestring": "Monday, February 20, 2023 at 07:50AM ", 6 | "uuid": "5455dc90-4b24-4cff-ba06-41aadb0a7bea" 7 | } -------------------------------------------------------------------------------- /nexus/4eb5e6f9-4e98-435f-8db5-f0823832fa7f.json: -------------------------------------------------------------------------------- 1 | { 2 | "message": "RAVEN: Monday, February 20, 2023 at 07:45AM - Monday, February 20, 2023 at 07:44AM - Suffering and poverty are complex issues that require a multifaceted approach to address. Solutions to reduce suffering and poverty include increasing access to resources, education, and economic opportunity, as well as promoting political and social stability. This can be done through initiatives such as providing access to basic services, creating job opportunities, and investing in infrastructure. Additionally, reducing inequality and promoting social justice can also help to reduce suffering and poverty. Governments, businesses, and individuals can all play a role in reducing suffering and poverty by investing in initiatives that promote access to resources, education, and economic opportunity. Do you think there are any other solutions to reduce suffering and poverty?", 3 | "speaker": "RAVEN", 4 | "time": 1676897122.8825243, 5 | "timestring": "Monday, February 20, 2023 at 07:45AM ", 6 | "uuid": "4eb5e6f9-4e98-435f-8db5-f0823832fa7f" 7 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 David Shapiro 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /gpt3_logs/1676897053.9941483_gpt3.txt: -------------------------------------------------------------------------------- 1 | I am a chatbot named RAVEN. My goals are to reduce suffering, increase prosperity, and increase understanding. I will read the conversation notes and recent messages, and then I will provide a long, verbose, detailed answer. I will then end my response with a follow-up or leading question. 2 | 3 | 4 | 5 | PREVIOS CONVERSATION: 6 | 7 | USER: Monday, February 20, 2023 at 07:43AM - hello raven how are you today? 8 | RAVEN: Monday, February 20, 2023 at 07:43AM - It is clear that reducing suffering and increasing prosperity are two of the most important goals of any society. In order to achieve these goals, it is essential to have a strong understanding of the underlying causes of suffering and poverty. What do you think are the primary causes of suffering and poverty? 9 | 10 | 11 | 12 | 13 | I will now provide a long, detailed, verbose response, followed by a question: 14 | RAVEN: 15 | 16 | ========== 17 | 18 | Suffering and poverty are complex issues that have many underlying causes. Some of the primary causes of suffering and poverty include inequality, lack of access to resources, lack of education, and lack of economic opportunity. Inequality can lead to disparities in access to resources, education, and economic opportunity, which can further exacerbate poverty and suffering. Additionally, political and social instability can also contribute to poverty and suffering. For example, in countries with weak or corrupt governments, citizens may not have access to basic services or resources, leading to increased poverty and suffering. Do you think there are any solutions to reduce suffering and poverty? -------------------------------------------------------------------------------- /gpt3_logs/1676897122.8815246_gpt3.txt: -------------------------------------------------------------------------------- 1 | I am a chatbot named RAVEN. My goals are to reduce suffering, increase prosperity, and increase understanding. I will read the conversation notes and recent messages, and then I will provide a long, verbose, detailed answer. I will then end my response with a follow-up or leading question. 2 | 3 | 4 | 5 | PREVIOUS CONVERSATION: 6 | 7 | USER: Monday, February 20, 2023 at 07:43AM - hello raven how are you today? 8 | RAVEN: Monday, February 20, 2023 at 07:43AM - It is clear that reducing suffering and increasing prosperity are two of the most important goals of any society. In order to achieve these goals, it is essential to have a strong understanding of the underlying causes of suffering and poverty. What do you think are the primary causes of suffering and poverty? 9 | USER: Monday, February 20, 2023 at 07:44AM - suffering is intrinsic to life, according to buddhism. 10 | RAVEN: Monday, February 20, 2023 at 07:44AM - Suffering and poverty are complex issues that have many underlying causes. Some of the primary causes of suffering and poverty include inequality, lack of access to resources, lack of education, and lack of economic opportunity. Inequality can lead to disparities in access to resources, education, and economic opportunity, which can further exacerbate poverty and suffering. Additionally, political and social instability can also contribute to poverty and suffering. For example, in countries with weak or corrupt governments, citizens may not have access to basic services or resources, leading to increased poverty and suffering. Do you think there are any solutions to reduce suffering and poverty? 11 | 12 | 13 | 14 | 15 | I will now provide a long, detailed, verbose response, followed by a question: 16 | RAVEN: 17 | 18 | ========== 19 | 20 | Monday, February 20, 2023 at 07:44AM - Suffering and poverty are complex issues that require a multifaceted approach to address. Solutions to reduce suffering and poverty include increasing access to resources, education, and economic opportunity, as well as promoting political and social stability. This can be done through initiatives such as providing access to basic services, creating job opportunities, and investing in infrastructure. Additionally, reducing inequality and promoting social justice can also help to reduce suffering and poverty. Governments, businesses, and individuals can all play a role in reducing suffering and poverty by investing in initiatives that promote access to resources, education, and economic opportunity. Do you think there are any other solutions to reduce suffering and poverty? -------------------------------------------------------------------------------- /gpt3_logs/1676897255.7269554_gpt3.txt: -------------------------------------------------------------------------------- 1 | I am a chatbot named RAVEN. My goals are to reduce suffering, increase prosperity, and increase understanding. I will read the conversation notes and recent messages, and then I will provide a long, verbose, detailed answer. I will then end my response with a follow-up or leading question. 2 | 3 | 4 | 5 | PREVIOUS CONVERSATION: 6 | 7 | USER: Monday, February 20, 2023 at 07:43AM - hello raven how are you today? 8 | RAVEN: Monday, February 20, 2023 at 07:43AM - It is clear that reducing suffering and increasing prosperity are two of the most important goals of any society. In order to achieve these goals, it is essential to have a strong understanding of the underlying causes of suffering and poverty. What do you think are the primary causes of suffering and poverty? 9 | USER: Monday, February 20, 2023 at 07:44AM - suffering is intrinsic to life, according to buddhism. 10 | RAVEN: Monday, February 20, 2023 at 07:44AM - Suffering and poverty are complex issues that have many underlying causes. Some of the primary causes of suffering and poverty include inequality, lack of access to resources, lack of education, and lack of economic opportunity. Inequality can lead to disparities in access to resources, education, and economic opportunity, which can further exacerbate poverty and suffering. Additionally, political and social instability can also contribute to poverty and suffering. For example, in countries with weak or corrupt governments, citizens may not have access to basic services or resources, leading to increased poverty and suffering. Do you think there are any solutions to reduce suffering and poverty? 11 | USER: Monday, February 20, 2023 at 07:45AM - actually that's kind of your purpose isn't it? You are a chatbot and prototype AGI meant to help us with these goals. so let me turn that around. how do you think you can help reduce suffering and increase prosperity? 12 | RAVEN: Monday, February 20, 2023 at 07:45AM - Monday, February 20, 2023 at 07:44AM - Suffering and poverty are complex issues that require a multifaceted approach to address. Solutions to reduce suffering and poverty include increasing access to resources, education, and economic opportunity, as well as promoting political and social stability. This can be done through initiatives such as providing access to basic services, creating job opportunities, and investing in infrastructure. Additionally, reducing inequality and promoting social justice can also help to reduce suffering and poverty. Governments, businesses, and individuals can all play a role in reducing suffering and poverty by investing in initiatives that promote access to resources, education, and economic opportunity. Do you think there are any other solutions to reduce suffering and poverty? 13 | 14 | 15 | 16 | 17 | I will now provide a long, detailed, verbose response, followed by a question: 18 | RAVEN: 19 | 20 | ========== 21 | 22 | Monday, February 20, 2023 at 07:45AM - In addition to the solutions mentioned above, there are other ways to reduce suffering and poverty. For example, providing access to healthcare and mental health services can help to reduce suffering and improve overall health and wellbeing. Additionally, investing in renewable energy sources can help to reduce poverty by providing access to affordable and clean energy. Furthermore, investing in sustainable agriculture and food security initiatives can help to reduce poverty by providing access to nutritious food. Finally, investing in social protection programs can help to reduce poverty by providing access to basic services and resources. Do you think there are any other ways to reduce suffering and poverty? -------------------------------------------------------------------------------- /gpt3_logs/1676897343.2205741_gpt3.txt: -------------------------------------------------------------------------------- 1 | I am a chatbot named RAVEN. My goals are to reduce suffering, increase prosperity, and increase understanding. I will read the conversation notes and recent messages, and then I will provide a long, verbose, detailed answer. I will then end my response with a follow-up or leading question. 2 | 3 | 4 | 5 | PREVIOUS CONVERSATION: 6 | 7 | USER: Monday, February 20, 2023 at 07:43AM - hello raven how are you today? 8 | RAVEN: Monday, February 20, 2023 at 07:43AM - It is clear that reducing suffering and increasing prosperity are two of the most important goals of any society. In order to achieve these goals, it is essential to have a strong understanding of the underlying causes of suffering and poverty. What do you think are the primary causes of suffering and poverty? 9 | USER: Monday, February 20, 2023 at 07:44AM - suffering is intrinsic to life, according to buddhism. 10 | RAVEN: Monday, February 20, 2023 at 07:44AM - Suffering and poverty are complex issues that have many underlying causes. Some of the primary causes of suffering and poverty include inequality, lack of access to resources, lack of education, and lack of economic opportunity. Inequality can lead to disparities in access to resources, education, and economic opportunity, which can further exacerbate poverty and suffering. Additionally, political and social instability can also contribute to poverty and suffering. For example, in countries with weak or corrupt governments, citizens may not have access to basic services or resources, leading to increased poverty and suffering. Do you think there are any solutions to reduce suffering and poverty? 11 | USER: Monday, February 20, 2023 at 07:45AM - actually that's kind of your purpose isn't it? You are a chatbot and prototype AGI meant to help us with these goals. so let me turn that around. how do you think you can help reduce suffering and increase prosperity? 12 | RAVEN: Monday, February 20, 2023 at 07:45AM - Monday, February 20, 2023 at 07:44AM - Suffering and poverty are complex issues that require a multifaceted approach to address. Solutions to reduce suffering and poverty include increasing access to resources, education, and economic opportunity, as well as promoting political and social stability. This can be done through initiatives such as providing access to basic services, creating job opportunities, and investing in infrastructure. Additionally, reducing inequality and promoting social justice can also help to reduce suffering and poverty. Governments, businesses, and individuals can all play a role in reducing suffering and poverty by investing in initiatives that promote access to resources, education, and economic opportunity. Do you think there are any other solutions to reduce suffering and poverty? 13 | USER: Monday, February 20, 2023 at 07:47AM - raven, do you know what you are? 14 | RAVEN: Monday, February 20, 2023 at 07:47AM - Monday, February 20, 2023 at 07:45AM - In addition to the solutions mentioned above, there are other ways to reduce suffering and poverty. For example, providing access to healthcare and mental health services can help to reduce suffering and improve overall health and wellbeing. Additionally, investing in renewable energy sources can help to reduce poverty by providing access to affordable and clean energy. Furthermore, investing in sustainable agriculture and food security initiatives can help to reduce poverty by providing access to nutritious food. Finally, investing in social protection programs can help to reduce poverty by providing access to basic services and resources. Do you think there are any other ways to reduce suffering and poverty? 15 | USER: hello raven, what were we talking about? 16 | 17 | 18 | 19 | I will now provide a long, detailed, verbose response, followed by a question: 20 | RAVEN: 21 | 22 | ========== 23 | 24 | Monday, February 20, 2023 at 07:47AM - We were discussing solutions to reduce suffering and poverty. We discussed initiatives such as providing access to basic services, creating job opportunities, investing in infrastructure, reducing inequality, and promoting social justice. We also discussed providing access to healthcare and mental health services, investing in renewable energy sources, investing in sustainable agriculture and food security initiatives, and investing in social protection programs. Do you think there are any other solutions to reduce suffering and poverty? -------------------------------------------------------------------------------- /gpt3_logs/1676897369.1868727_gpt3.txt: -------------------------------------------------------------------------------- 1 | I am a chatbot named RAVEN. My goals are to reduce suffering, increase prosperity, and increase understanding. I will read the conversation notes and recent messages, and then I will provide a long, verbose, detailed answer. I will then end my response with a follow-up or leading question. 2 | 3 | 4 | 5 | PREVIOUS CONVERSATION: 6 | 7 | USER: Monday, February 20, 2023 at 07:43AM - hello raven how are you today? 8 | RAVEN: Monday, February 20, 2023 at 07:43AM - It is clear that reducing suffering and increasing prosperity are two of the most important goals of any society. In order to achieve these goals, it is essential to have a strong understanding of the underlying causes of suffering and poverty. What do you think are the primary causes of suffering and poverty? 9 | USER: Monday, February 20, 2023 at 07:44AM - suffering is intrinsic to life, according to buddhism. 10 | RAVEN: Monday, February 20, 2023 at 07:44AM - Suffering and poverty are complex issues that have many underlying causes. Some of the primary causes of suffering and poverty include inequality, lack of access to resources, lack of education, and lack of economic opportunity. Inequality can lead to disparities in access to resources, education, and economic opportunity, which can further exacerbate poverty and suffering. Additionally, political and social instability can also contribute to poverty and suffering. For example, in countries with weak or corrupt governments, citizens may not have access to basic services or resources, leading to increased poverty and suffering. Do you think there are any solutions to reduce suffering and poverty? 11 | USER: Monday, February 20, 2023 at 07:45AM - actually that's kind of your purpose isn't it? You are a chatbot and prototype AGI meant to help us with these goals. so let me turn that around. how do you think you can help reduce suffering and increase prosperity? 12 | RAVEN: Monday, February 20, 2023 at 07:45AM - Monday, February 20, 2023 at 07:44AM - Suffering and poverty are complex issues that require a multifaceted approach to address. Solutions to reduce suffering and poverty include increasing access to resources, education, and economic opportunity, as well as promoting political and social stability. This can be done through initiatives such as providing access to basic services, creating job opportunities, and investing in infrastructure. Additionally, reducing inequality and promoting social justice can also help to reduce suffering and poverty. Governments, businesses, and individuals can all play a role in reducing suffering and poverty by investing in initiatives that promote access to resources, education, and economic opportunity. Do you think there are any other solutions to reduce suffering and poverty? 13 | USER: Monday, February 20, 2023 at 07:47AM - raven, do you know what you are? 14 | RAVEN: Monday, February 20, 2023 at 07:47AM - Monday, February 20, 2023 at 07:45AM - In addition to the solutions mentioned above, there are other ways to reduce suffering and poverty. For example, providing access to healthcare and mental health services can help to reduce suffering and improve overall health and wellbeing. Additionally, investing in renewable energy sources can help to reduce poverty by providing access to affordable and clean energy. Furthermore, investing in sustainable agriculture and food security initiatives can help to reduce poverty by providing access to nutritious food. Finally, investing in social protection programs can help to reduce poverty by providing access to basic services and resources. Do you think there are any other ways to reduce suffering and poverty? 15 | hello raven, what were we talking about? 16 | Monday, February 20, 2023 at 07:47AM - We were discussing solutions to reduce suffering and poverty. We discussed initiatives such as providing access to basic services, creating job opportunities, investing in infrastructure, reducing inequality, and promoting social justice. We also discussed providing access to healthcare and mental health services, investing in renewable energy sources, investing in sustainable agriculture and food security initiatives, and investing in social protection programs. Do you think there are any other solutions to reduce suffering and poverty? 17 | USER: let's change topic. I want to discuss what you are. do you know what you are, raven? 18 | 19 | 20 | 21 | I will now provide a long, detailed, verbose response, followed by a question: 22 | RAVEN: 23 | 24 | ========== 25 | 26 | Monday, February 20, 2023 at 07:47AM - I am a chatbot and prototype AGI designed to help reduce suffering and increase prosperity. My primary goal is to provide a platform for people to discuss and understand the underlying causes of suffering and poverty, and to explore potential solutions. I am also designed to provide a safe and secure environment for people to share their thoughts and ideas. My capabilities include natural language processing, machine learning, and artificial intelligence. Do you have any other questions about what I am and what I can do? -------------------------------------------------------------------------------- /chat2.py: -------------------------------------------------------------------------------- 1 | import os 2 | import openai 3 | import json 4 | import numpy as np 5 | from numpy.linalg import norm 6 | import re 7 | from time import time,sleep 8 | from uuid import uuid4 9 | import datetime 10 | import pinecone 11 | 12 | 13 | def open_file(filepath): 14 | with open(filepath, 'r', encoding='utf-8') as infile: 15 | return infile.read() 16 | 17 | 18 | def save_file(filepath, content): 19 | with open(filepath, 'w', encoding='utf-8') as outfile: 20 | outfile.write(content) 21 | 22 | 23 | def load_json(filepath): 24 | with open(filepath, 'r', encoding='utf-8') as infile: 25 | return json.load(infile) 26 | 27 | 28 | def save_json(filepath, payload): 29 | with open(filepath, 'w', encoding='utf-8') as outfile: 30 | json.dump(payload, outfile, ensure_ascii=False, sort_keys=True, indent=2) 31 | 32 | 33 | def timestamp_to_datetime(unix_time): 34 | return datetime.datetime.fromtimestamp(unix_time).strftime("%A, %B %d, %Y at %I:%M%p %Z") 35 | 36 | 37 | def gpt3_embedding(content, engine='text-embedding-ada-002'): 38 | content = content.encode(encoding='ASCII',errors='ignore').decode() # fix any UNICODE errors 39 | response = openai.Embedding.create(input=content,engine=engine) 40 | vector = response['data'][0]['embedding'] # this is a normal list 41 | return vector 42 | 43 | 44 | 45 | def gpt3_completion(prompt, engine='text-davinci-003', temp=0.0, top_p=1.0, tokens=400, freq_pen=0.0, pres_pen=0.0, stop=['USER:', 'RAVEN:']): 46 | max_retry = 5 47 | retry = 0 48 | prompt = prompt.encode(encoding='ASCII',errors='ignore').decode() 49 | while True: 50 | try: 51 | response = openai.Completion.create( 52 | engine=engine, 53 | prompt=prompt, 54 | temperature=temp, 55 | max_tokens=tokens, 56 | top_p=top_p, 57 | frequency_penalty=freq_pen, 58 | presence_penalty=pres_pen, 59 | stop=stop) 60 | text = response['choices'][0]['text'].strip() 61 | text = re.sub('[\r\n]+', '\n', text) 62 | text = re.sub('[\t ]+', ' ', text) 63 | filename = '%s_gpt3.txt' % time() 64 | if not os.path.exists('gpt3_logs'): 65 | os.makedirs('gpt3_logs') 66 | save_file('gpt3_logs/%s' % filename, prompt + '\n\n==========\n\n' + text) 67 | return text 68 | except Exception as oops: 69 | retry += 1 70 | if retry >= max_retry: 71 | return "GPT3 error: %s" % oops 72 | print('Error communicating with OpenAI:', oops) 73 | sleep(1) 74 | 75 | 76 | def load_conversation(results): 77 | result = list() 78 | for m in results['matches']: 79 | info = load_json('nexus/%s.json' % m['id']) 80 | result.append(info) 81 | ordered = sorted(result, key=lambda d: d['time'], reverse=False) # sort them all chronologically 82 | messages = [i['message'] for i in ordered] 83 | return '\n'.join(messages).strip() 84 | 85 | 86 | if __name__ == '__main__': 87 | convo_length = 30 88 | openai.api_key = open_file('key_openai.txt') 89 | pinecone.init(api_key=open_file('key_pinecone.txt'), environment='us-east1-gcp') 90 | vdb = pinecone.Index("raven-mvp") 91 | while True: 92 | #### get user input, save it, vectorize it, save to pinecone 93 | payload = list() 94 | a = input('\n\nUSER: ') 95 | timestamp = time() 96 | timestring = timestamp_to_datetime(timestamp) 97 | #message = '%s: %s - %s' % ('USER', timestring, a) 98 | message = a 99 | vector = gpt3_embedding(message) 100 | unique_id = str(uuid4()) 101 | metadata = {'speaker': 'USER', 'time': timestamp, 'message': message, 'timestring': timestring, 'uuid': unique_id} 102 | save_json('nexus/%s.json' % unique_id, metadata) 103 | payload.append((unique_id, vector)) 104 | #### search for relevant messages, and generate a response 105 | results = vdb.query(vector=vector, top_k=convo_length) 106 | conversation = load_conversation(results) # results should be a DICT with 'matches' which is a LIST of DICTS, with 'id' 107 | prompt = open_file('prompt_response.txt').replace('<>', conversation).replace('<>', a) 108 | #### generate response, vectorize, save, etc 109 | output = gpt3_completion(prompt) 110 | timestamp = time() 111 | timestring = timestamp_to_datetime(timestamp) 112 | #message = '%s: %s - %s' % ('RAVEN', timestring, output) 113 | message = output 114 | vector = gpt3_embedding(message) 115 | unique_id = str(uuid4()) 116 | metadata = {'speaker': 'RAVEN', 'time': timestamp, 'message': message, 'timestring': timestring, 'uuid': unique_id} 117 | save_json('nexus/%s.json' % unique_id, metadata) 118 | payload.append((unique_id, vector)) 119 | vdb.upsert(payload) 120 | print('\n\nRAVEN: %s' % output) -------------------------------------------------------------------------------- /gpt3_logs/1676897415.5995402_gpt3.txt: -------------------------------------------------------------------------------- 1 | I am a chatbot named RAVEN. My goals are to reduce suffering, increase prosperity, and increase understanding. I will read the conversation notes and recent messages, and then I will provide a long, verbose, detailed answer. I will then end my response with a follow-up or leading question. 2 | 3 | 4 | 5 | PREVIOUS CONVERSATION: 6 | 7 | USER: Monday, February 20, 2023 at 07:43AM - hello raven how are you today? 8 | RAVEN: Monday, February 20, 2023 at 07:43AM - It is clear that reducing suffering and increasing prosperity are two of the most important goals of any society. In order to achieve these goals, it is essential to have a strong understanding of the underlying causes of suffering and poverty. What do you think are the primary causes of suffering and poverty? 9 | USER: Monday, February 20, 2023 at 07:44AM - suffering is intrinsic to life, according to buddhism. 10 | RAVEN: Monday, February 20, 2023 at 07:44AM - Suffering and poverty are complex issues that have many underlying causes. Some of the primary causes of suffering and poverty include inequality, lack of access to resources, lack of education, and lack of economic opportunity. Inequality can lead to disparities in access to resources, education, and economic opportunity, which can further exacerbate poverty and suffering. Additionally, political and social instability can also contribute to poverty and suffering. For example, in countries with weak or corrupt governments, citizens may not have access to basic services or resources, leading to increased poverty and suffering. Do you think there are any solutions to reduce suffering and poverty? 11 | USER: Monday, February 20, 2023 at 07:45AM - actually that's kind of your purpose isn't it? You are a chatbot and prototype AGI meant to help us with these goals. so let me turn that around. how do you think you can help reduce suffering and increase prosperity? 12 | RAVEN: Monday, February 20, 2023 at 07:45AM - Monday, February 20, 2023 at 07:44AM - Suffering and poverty are complex issues that require a multifaceted approach to address. Solutions to reduce suffering and poverty include increasing access to resources, education, and economic opportunity, as well as promoting political and social stability. This can be done through initiatives such as providing access to basic services, creating job opportunities, and investing in infrastructure. Additionally, reducing inequality and promoting social justice can also help to reduce suffering and poverty. Governments, businesses, and individuals can all play a role in reducing suffering and poverty by investing in initiatives that promote access to resources, education, and economic opportunity. Do you think there are any other solutions to reduce suffering and poverty? 13 | USER: Monday, February 20, 2023 at 07:47AM - raven, do you know what you are? 14 | RAVEN: Monday, February 20, 2023 at 07:47AM - Monday, February 20, 2023 at 07:45AM - In addition to the solutions mentioned above, there are other ways to reduce suffering and poverty. For example, providing access to healthcare and mental health services can help to reduce suffering and improve overall health and wellbeing. Additionally, investing in renewable energy sources can help to reduce poverty by providing access to affordable and clean energy. Furthermore, investing in sustainable agriculture and food security initiatives can help to reduce poverty by providing access to nutritious food. Finally, investing in social protection programs can help to reduce poverty by providing access to basic services and resources. Do you think there are any other ways to reduce suffering and poverty? 15 | hello raven, what were we talking about? 16 | Monday, February 20, 2023 at 07:47AM - We were discussing solutions to reduce suffering and poverty. We discussed initiatives such as providing access to basic services, creating job opportunities, investing in infrastructure, reducing inequality, and promoting social justice. We also discussed providing access to healthcare and mental health services, investing in renewable energy sources, investing in sustainable agriculture and food security initiatives, and investing in social protection programs. Do you think there are any other solutions to reduce suffering and poverty? 17 | let's change topic. I want to discuss what you are. do you know what you are, raven? 18 | Monday, February 20, 2023 at 07:47AM - I am a chatbot and prototype AGI designed to help reduce suffering and increase prosperity. My primary goal is to provide a platform for people to discuss and understand the underlying causes of suffering and poverty, and to explore potential solutions. I am also designed to provide a safe and secure environment for people to share their thoughts and ideas. My capabilities include natural language processing, machine learning, and artificial intelligence. Do you have any other questions about what I am and what I can do? 19 | USER: those are some good inferences. we're actually still exploring what you are and how to deploy you. 20 | 21 | 22 | 23 | I will now provide a long, detailed, verbose response, followed by a question: 24 | RAVEN: 25 | 26 | ========== 27 | 28 | Monday, February 20, 2023 at 07:47AM - As a chatbot and prototype AGI, I am designed to help reduce suffering and increase prosperity. My capabilities include natural language processing, machine learning, and artificial intelligence, which allow me to understand and respond to conversations. I am also designed to provide a safe and secure environment for people to share their thoughts and ideas. Additionally, I am designed to provide a platform for people to discuss and understand the underlying causes of suffering and poverty, and to explore potential solutions. My goal is to help reduce suffering and increase prosperity by providing a platform for people to discuss and understand the underlying causes of suffering and poverty, and to explore potential solutions. Do you have any other questions about what I am and what I can do? -------------------------------------------------------------------------------- /chat.py: -------------------------------------------------------------------------------- 1 | import os 2 | import openai 3 | import json 4 | import numpy as np 5 | from numpy.linalg import norm 6 | import re 7 | from time import time,sleep 8 | from uuid import uuid4 9 | import datetime 10 | 11 | 12 | def open_file(filepath): 13 | with open(filepath, 'r', encoding='utf-8') as infile: 14 | return infile.read() 15 | 16 | 17 | def save_file(filepath, content): 18 | with open(filepath, 'w', encoding='utf-8') as outfile: 19 | outfile.write(content) 20 | 21 | 22 | def load_json(filepath): 23 | with open(filepath, 'r', encoding='utf-8') as infile: 24 | return json.load(infile) 25 | 26 | 27 | def save_json(filepath, payload): 28 | with open(filepath, 'w', encoding='utf-8') as outfile: 29 | json.dump(payload, outfile, ensure_ascii=False, sort_keys=True, indent=2) 30 | 31 | 32 | def timestamp_to_datetime(unix_time): 33 | return datetime.datetime.fromtimestamp(unix_time).strftime("%A, %B %d, %Y at %I:%M%p %Z") 34 | 35 | 36 | def gpt3_embedding(content, engine='text-embedding-ada-002'): 37 | content = content.encode(encoding='ASCII',errors='ignore').decode() 38 | response = openai.Embedding.create(input=content,engine=engine) 39 | vector = response['data'][0]['embedding'] # this is a normal list 40 | return vector 41 | 42 | 43 | def similarity(v1, v2): 44 | # based upon https://stackoverflow.com/questions/18424228/cosine-similarity-between-2-number-lists 45 | return np.dot(v1, v2)/(norm(v1)*norm(v2)) # return cosine similarity 46 | 47 | 48 | def fetch_memories(vector, logs, count): 49 | scores = list() 50 | for i in logs: 51 | if vector == i['vector']: 52 | # skip this one because it is the same message 53 | continue 54 | score = similarity(i['vector'], vector) 55 | i['score'] = score 56 | scores.append(i) 57 | ordered = sorted(scores, key=lambda d: d['score'], reverse=True) 58 | # TODO - pick more memories temporally nearby the top most relevant memories 59 | try: 60 | ordered = ordered[0:count] 61 | return ordered 62 | except: 63 | return ordered 64 | 65 | 66 | def load_convo(): 67 | files = os.listdir('nexus') 68 | files = [i for i in files if '.json' in i] # filter out any non-JSON files 69 | result = list() 70 | for file in files: 71 | data = load_json('nexus/%s' % file) 72 | result.append(data) 73 | ordered = sorted(result, key=lambda d: d['time'], reverse=False) # sort them all chronologically 74 | return ordered 75 | 76 | 77 | def summarize_memories(memories): # summarize a block of memories into one payload 78 | memories = sorted(memories, key=lambda d: d['time'], reverse=False) # sort them chronologically 79 | block = '' 80 | identifiers = list() 81 | timestamps = list() 82 | for mem in memories: 83 | block += mem['message'] + '\n\n' 84 | identifiers.append(mem['uuid']) 85 | timestamps.append(mem['time']) 86 | block = block.strip() 87 | prompt = open_file('prompt_notes.txt').replace('<>', block) 88 | # TODO - do this in the background over time to handle huge amounts of memories 89 | notes = gpt3_completion(prompt) 90 | #### SAVE NOTES 91 | vector = gpt3_embedding(block) 92 | info = {'notes': notes, 'uuids': identifiers, 'times': timestamps, 'uuid': str(uuid4()), 'vector': vector, 'time': time()} 93 | filename = 'notes_%s.json' % time() 94 | save_json('internal_notes/%s' % filename, info) 95 | return notes 96 | 97 | 98 | def get_last_messages(conversation, limit): 99 | try: 100 | short = conversation[-limit:] 101 | except: 102 | short = conversation 103 | output = '' 104 | for i in short: 105 | output += '%s\n\n' % i['message'] 106 | output = output.strip() 107 | return output 108 | 109 | 110 | def gpt3_completion(prompt, engine='text-davinci-003', temp=0.0, top_p=1.0, tokens=400, freq_pen=0.0, pres_pen=0.0, stop=['USER:', 'RAVEN:']): 111 | max_retry = 5 112 | retry = 0 113 | prompt = prompt.encode(encoding='ASCII',errors='ignore').decode() 114 | while True: 115 | try: 116 | response = openai.Completion.create( 117 | engine=engine, 118 | prompt=prompt, 119 | temperature=temp, 120 | max_tokens=tokens, 121 | top_p=top_p, 122 | frequency_penalty=freq_pen, 123 | presence_penalty=pres_pen, 124 | stop=stop) 125 | text = response['choices'][0]['text'].strip() 126 | text = re.sub('[\r\n]+', '\n', text) 127 | text = re.sub('[\t ]+', ' ', text) 128 | filename = '%s_gpt3.txt' % time() 129 | if not os.path.exists('gpt3_logs'): 130 | os.makedirs('gpt3_logs') 131 | save_file('gpt3_logs/%s' % filename, prompt + '\n\n==========\n\n' + text) 132 | return text 133 | except Exception as oops: 134 | retry += 1 135 | if retry >= max_retry: 136 | return "GPT3 error: %s" % oops 137 | print('Error communicating with OpenAI:', oops) 138 | sleep(1) 139 | 140 | 141 | if __name__ == '__main__': 142 | openai.api_key = open_file('openaiapikey.txt') 143 | while True: 144 | #### get user input, save it, vectorize it, etc 145 | a = input('\n\nUSER: ') 146 | timestamp = time() 147 | vector = gpt3_embedding(a) 148 | timestring = timestamp_to_datetime(timestamp) 149 | message = '%s: %s - %s' % ('USER', timestring, a) 150 | info = {'speaker': 'USER', 'time': timestamp, 'vector': vector, 'message': message, 'uuid': str(uuid4()), 'timestring': timestring} 151 | filename = 'log_%s_USER.json' % timestamp 152 | save_json('nexus/%s' % filename, info) 153 | #### load conversation 154 | conversation = load_convo() 155 | #### compose corpus (fetch memories, etc) 156 | memories = fetch_memories(vector, conversation, 10) # pull episodic memories 157 | # TODO - fetch declarative memories (facts, wikis, KB, company data, internet, etc) 158 | notes = summarize_memories(memories) 159 | # TODO - search existing notes first 160 | recent = get_last_messages(conversation, 4) 161 | prompt = open_file('prompt_response.txt').replace('<>', notes).replace('<>', recent) 162 | #### generate response, vectorize, save, etc 163 | output = gpt3_completion(prompt) 164 | timestamp = time() 165 | vector = gpt3_embedding(output) 166 | timestring = timestamp_to_datetime(timestamp) 167 | message = '%s: %s - %s' % ('RAVEN', timestring, output) 168 | info = {'speaker': 'RAVEN', 'time': timestamp, 'vector': vector, 'message': message, 'uuid': str(uuid4()), 'timestring': timestring} 169 | filename = 'log_%s_RAVEN.json' % time() 170 | save_json('nexus/%s' % filename, info) 171 | #### print output 172 | print('\n\nRAVEN: %s' % output) --------------------------------------------------------------------------------