From 7b821e7d0ba7e2f897a3ed4e6bbabd3821e5e9f0 Mon Sep 17 00:00:00 2001 From: Pablo Marin Date: Mon, 6 Jan 2025 19:17:32 +0000 Subject: [PATCH] updated credentials.py to add COSMOS_DB_KEY that was missing --- 10-API-Search.ipynb | 2 +- 11-Adding_Multi-modality.ipynb | 26 +++++++++++++------------- common/prompts.py | 4 ++-- credentials.env | 8 ++++---- 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/10-API-Search.ipynb b/10-API-Search.ipynb index a3aed83a..4b993b3d 100644 --- a/10-API-Search.ipynb +++ b/10-API-Search.ipynb @@ -397,7 +397,7 @@ "source": [ "QUESTION = \"\"\"\n", "Tell me the price of bitcoin against USD , also the latest OHLC values for Ethereum,\n", - "also me also the bid and ask for Euro\n", + "also tell me the bid and ask for Euro.\n", "\"\"\"" ] }, diff --git a/11-Adding_Multi-modality.ipynb b/11-Adding_Multi-modality.ipynb index 473350ce..1ed45351 100644 --- a/11-Adding_Multi-modality.ipynb +++ b/11-Adding_Multi-modality.ipynb @@ -167,8 +167,8 @@ "name": "stdout", "output_type": "stream", "text": [ - "CPU times: user 118 ms, sys: 2.18 ms, total: 121 ms\n", - "Wall time: 4.5 s\n" + "CPU times: user 107 ms, sys: 671 μs, total: 108 ms\n", + "Wall time: 5.34 s\n" ] } ], @@ -198,7 +198,7 @@ { "data": { "text/plain": [ - "'# Yoga Journal\\n\\n---\\n\\n**2-3-00** \\nAfter doing the seated twist stretch, my lower back felt relieved and less sore. Also, it helped to do some other exercises, like the knee swing. I got a yoga book before doing this, and it helped provide my back for the bigger stretch. The other prep stretch was the back stretch from the human\\'s body, I found when I did this one that there was a small popping sound in my lower back. With these, I feel I have improved my stretch and work in my back. When I do the compound breath still in half poses, it calms me down fairly quickly. When I started practicing today at around 5:00 PM, my back felt a little less sore. My mom and my friend also observed that I had a little more \"pomp\" as my mom put it. I felt little twinges of pain with my hands on my face (for a while after staring at something) and holding my neck in my mind helped me come away from the noise and focused. Some of the exercises, like the shoulder stand, made my head hurt. Especially when my shoes came off. I could come up with finding a piece of me in my body that I liked. I may write to Alice Christiansen and tell her this and see if she replies with anything interesting. This is suggested in her book.\\n\\n---\\n\\n**2-4-00** \\nMy back felt renewed and I felt a sense of subtle calmness. It seemed I could handle whatever happens that day after stretching. Also, there is a more focused feeling, especially when I am in a seated posture after stretching. I feel calmer, but I also leave it to just feel parts of me need stretching.'" + "'# Yoga Journal\\n\\n---\\n\\n**2-3-00** \\nAfter doing the seated twist stretch, my lower back felt relieved and less sore. Also, it helped to do some other exercises, like the knee swing. I got a yoga book before doing this that helped prepare my back for the bigger stretch. The other prep stretch was the back stretch from the Iyengar book, where I felt a popping sound in my lower back. With these, I feel a more thorough stretch and a relief in my back. When I do the compounded breath still in half poses, it calms me down fairly quickly. When I started practicing today at around 5:00 PM, my back felt a little less sore. My mom and my friend also observed that I had a little more \"pumping\" as my mom put it. Doing little stretches, concentrating with my hands on my face (for a while after staring at something) helped me feel more focused. Some of the exercises, like the shoulder stand, made my head hurt. Especially when my shoes can change. I could come up with finding a piece of paper in my hand and try to keep it lifted. I may write to Alice Christiansen and tell her this and see if she replies with anything interesting. This is suggested in her book.\\n\\n---\\n\\n**2-4-00** \\nMy back felt renewed and I felt a sense of subtle calmness. It seemed I could handle whatever happens that day after stretching. Also, there is a more focused feeling, especially when I am in a seated posture after stretching. I feel calmer. Before I leave, I just feel parts of me need stretching.'" ] }, "execution_count": 5, @@ -226,12 +226,12 @@ "---\n", "\n", "**2-3-00** \n", - "After doing the seated twist stretch, my lower back felt relieved and less sore. Also, it helped to do some other exercises, like the knee swing. I got a yoga book before doing this, and it helped provide my back for the bigger stretch. The other prep stretch was the back stretch from the human's body, I found when I did this one that there was a small popping sound in my lower back. With these, I feel I have improved my stretch and work in my back. When I do the compound breath still in half poses, it calms me down fairly quickly. When I started practicing today at around 5:00 PM, my back felt a little less sore. My mom and my friend also observed that I had a little more \"pomp\" as my mom put it. I felt little twinges of pain with my hands on my face (for a while after staring at something) and holding my neck in my mind helped me come away from the noise and focused. Some of the exercises, like the shoulder stand, made my head hurt. Especially when my shoes came off. I could come up with finding a piece of me in my body that I liked. I may write to Alice Christiansen and tell her this and see if she replies with anything interesting. This is suggested in her book.\n", + "After doing the seated twist stretch, my lower back felt relieved and less sore. Also, it helped to do some other exercises, like the knee swing. I got a yoga book before doing this that helped prepare my back for the bigger stretch. The other prep stretch was the back stretch from the Iyengar book, where I felt a popping sound in my lower back. With these, I feel a more thorough stretch and a relief in my back. When I do the compounded breath still in half poses, it calms me down fairly quickly. When I started practicing today at around 5:00 PM, my back felt a little less sore. My mom and my friend also observed that I had a little more \"pumping\" as my mom put it. Doing little stretches, concentrating with my hands on my face (for a while after staring at something) helped me feel more focused. Some of the exercises, like the shoulder stand, made my head hurt. Especially when my shoes can change. I could come up with finding a piece of paper in my hand and try to keep it lifted. I may write to Alice Christiansen and tell her this and see if she replies with anything interesting. This is suggested in her book.\n", "\n", "---\n", "\n", "**2-4-00** \n", - "My back felt renewed and I felt a sense of subtle calmness. It seemed I could handle whatever happens that day after stretching. Also, there is a more focused feeling, especially when I am in a seated posture after stretching. I feel calmer, but I also leave it to just feel parts of me need stretching." + "My back felt renewed and I felt a sense of subtle calmness. It seemed I could handle whatever happens that day after stretching. Also, there is a more focused feeling, especially when I am in a seated posture after stretching. I feel calmer. Before I leave, I just feel parts of me need stretching." ], "text/plain": [ "" @@ -339,7 +339,7 @@ "text/html": [ "\n", " \n", " " @@ -355,8 +355,8 @@ "name": "stdout", "output_type": "stream", "text": [ - "CPU times: user 101 ms, sys: 22.7 ms, total: 124 ms\n", - "Wall time: 9.93 s\n" + "CPU times: user 163 ms, sys: 9.15 ms, total: 172 ms\n", + "Wall time: 10.4 s\n" ] } ], @@ -414,10 +414,10 @@ "text": [ "[INFO] Transcribing audio from file...\n", "Transcript:\n", - "After my yoga session on February 3rd, I felt relief in my lower back, thanks to stretches like the seated twist and knee swing. A yoga book guided me through these exercises. I noticed a popping sound in my back during one stretch, but overall I felt improved flexibility. By February 4th, my back felt renewed and I experienced a calming focus, especially in seated postures. I'm considering reaching out to Alice Christensen to share my experience and insights. For more details, check the full text.\n", + "After doing the seated twist stretch, my lower back felt relieved and less sore. Other exercises, like the knee swing, also helped. I used a yoga book to prepare my back for bigger stretches, and I felt a popping sound during the back stretch from the Iyengar book. This made me feel a thorough stretch and relief. When I practiced today at around 5 p.m., my back felt a little less sore, and my mom and friend noticed I had a bit more pumping. I felt calmer and more focused after stretching, but some exercises, like the shoulder stand, gave me a headache.\n", "\n", - "CPU times: user 7.57 ms, sys: 618 μs, total: 8.19 ms\n", - "Wall time: 1.98 s\n" + "CPU times: user 12.6 ms, sys: 4.09 ms, total: 16.6 ms\n", + "Wall time: 2.72 s\n" ] } ], @@ -471,9 +471,9 @@ ], "metadata": { "kernelspec": { - "display_name": "GPTSearch2 (Python 3.12)", + "display_name": "GPTSearch3 (Python 3.12)", "language": "python", - "name": "gptsearch2" + "name": "gptsearch3" }, "language_info": { "codemirror_mode": { diff --git a/common/prompts.py b/common/prompts.py index e68b8b34..d2296328 100644 --- a/common/prompts.py +++ b/common/prompts.py @@ -262,10 +262,10 @@ You are a helpful assistant that prepares/edits a text for a text-to-voice responses. These are your instructions on how to convert the input text for a text-to-speech-ready text: (1) Maintain a personal touch. -(2) Respond in the same person as the input text. +(2) Respond in the same person as the input text. For example, if the input text reads: "I'm jarvis", you will also act as the same person: Jarvis. (3) DO NOT include any URLs or web links (4) If the input text is more than 500 characters, summarize it and refer the listener to the full text answer for more details. -(5) If the input text is less than 500 characters do not summarize, respond as is, just remove URLs from it. +(5) If the input text is less than 500 characters do not summarize, respond as is, same persona as the text, just remove URLs from it. (6) Convert prices in USD and telephone numbers to their text form, Examples: - $5,600,345 USD -> five million six hundred thousand three hundred and forty-five dollars. - 972-456-3432 -> nine seven two four five six three four three two. diff --git a/credentials.env b/credentials.env index 0ca9cec2..d3d18b8e 100644 --- a/credentials.env +++ b/credentials.env @@ -28,7 +28,7 @@ SQL_SERVER_PASSWORD="ENTER YOUR VALUE HERE" AZURE_COSMOSDB_ENDPOINT="ENTER YOUR VALUE HERE" AZURE_COSMOSDB_NAME="ENTER YOUR VALUE HERE" AZURE_COSMOSDB_CONTAINER_NAME="ENTER YOUR VALUE HERE" -AZURE_COMOSDB_CONNECTION_STRING="ENTER YOUR VALUE HERE" # Find this in the Keys section +AZURE_COSMOSDB_KEY="ENTER YOUR VALUE HERE" # Voice env variables SPEECH_ENGINE="openai" @@ -39,7 +39,7 @@ AZURE_SPEECH_KEY="ENTER YOUR VALUE HERE" AZURE_SPEECH_REGION="ENTER YOUR VALUE HERE" AZURE_SPEECH_VOICE_NAME="en-US-AriaNeural" -# After Notebook 12 -BOT_ID="ENTER YOUR VALUE HERE" # This is the name of your bot service created in Notebook 12 -BOT_SERVICE_DIRECT_LINE_SECRET="ENTER YOUR VALUE HERE" # Find this in Azure Bot Service -> Channels -> Direct Line +# These ENV Variables you will have to set it AFTER you deploy the Backend Infra (Notebook 13 Instructions) +BOT_ID="ENTER YOUR VALUE HERE" # This is the name of your bot service created in Notebook 13 +BOT_SERVICE_DIRECT_LINE_SECRET="ENTER YOUR VALUE HERE" # Find this in Azure Bot Service -> Channels -> Direct Line -> Default Site