Spaces:
Runtime error
Runtime error
v0.1.4
Browse files- src/chromaIntf.py +4 -1
- test/test.rest +12 -0
src/chromaIntf.py
CHANGED
@@ -11,7 +11,9 @@ import baseInfra.dropbox_handler as dbh
|
|
11 |
from baseInfra.dbInterface import DbInterface
|
12 |
from uuid import UUID
|
13 |
from langchain.text_splitter import RecursiveCharacterTextSplitter
|
|
|
14 |
|
|
|
15 |
|
16 |
class ChromaIntf():
|
17 |
def __init__(self):
|
@@ -174,7 +176,8 @@ class ChromaIntf():
|
|
174 |
print(doc)
|
175 |
try:
|
176 |
return await self.vectorstore.aadd_documents(docs,ids=[metadata['ID']])
|
177 |
-
except:
|
|
|
178 |
print("inside expect of addText")
|
179 |
return await self.vectorstore.aadd_documents(docs,ids=[metadata.ID])
|
180 |
|
|
|
11 |
from baseInfra.dbInterface import DbInterface
|
12 |
from uuid import UUID
|
13 |
from langchain.text_splitter import RecursiveCharacterTextSplitter
|
14 |
+
import logging
|
15 |
|
16 |
+
logger=logging.getLogger("root")
|
17 |
|
18 |
class ChromaIntf():
|
19 |
def __init__(self):
|
|
|
176 |
print(doc)
|
177 |
try:
|
178 |
return await self.vectorstore.aadd_documents(docs,ids=[metadata['ID']])
|
179 |
+
except Exception as ex:
|
180 |
+
logger.exception("exception in adding",exc_info=True)
|
181 |
print("inside expect of addText")
|
182 |
return await self.vectorstore.aadd_documents(docs,ids=[metadata.ID])
|
183 |
|
test/test.rest
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
POST https://anubhav77-maya-persistence.hf.space/api/v1/addTextDocument
|
2 |
+
content-type: application/json
|
3 |
+
|
4 |
+
{
|
5 |
+
"metadata": {
|
6 |
+
"timestamp": "2024-01-03T11:29:16.171546",
|
7 |
+
"source": "book",
|
8 |
+
"author": "Brain P Moran",
|
9 |
+
"title": "The 12 week year"
|
10 |
+
},
|
11 |
+
"text":"Three Principles The 12 Week Year builds on a foundation of three principles that in the end determine an individual ’s eff ectiveness and success. These principles are: 1. Accountability 2. Commitment 3. Greatness in the Moment Let ’s take a closer look at each one. Accountability: Accountability is ultimately ownership. It is a character trait, a life stance, a willingness to own actions and results, regardless of the circumstances. The very nature of accountability rests on the understanding that each and every one of us has freedom of choice. It is this freedom of choice that is the foundation of accountability. The ultimate aim of accountability is to continually ask one ’s self, What more can I do to get the result? Commitment: Commitment is a personal promise that you make to yourself. Keeping your promises to others builds strong relationships, and keeping promises to yourself builds character, esteem, and success. Commitment and accountability go hand-in-glove. In a sense, commitment is accountability projected into the future. It is ownership of a future action or result. Building your commitment capacity has a dramatic eff ect on your personal and business results. The 12 Week Year helps you to build the capacity to follow through on critical commitments and achieve breakthrough results in all areas. Greatness in the Moment: As I wrote in Chapter 10 , greatness is not achieved when a great result is reached, but long before that, when an individual makes the choice to do what is necessary to become great. The results are not the attainment of greatness, but simply confi rmation of it. You become great long before the results show it. It happens in an instant, the moment you choose to do the things you need to do to be great, and each moment that you continue to choose to do those things. These three principles—accountability, commitment, and greatness in the moment—form the foundation of personal and professional success. Five Disciplines The 12 Week Year tackles both the way you think and the actions you take. At the action level, it concentrates on building capacity within a set of success disciplines that are required for eff ective execution. We have found that top performers— whether athletes or business professionals—are great, not because their ideas are better, but because their execution disciplines are better. These fi ve disciplines are: 1. Vision 2. Planning 3. Process Control 4. Measurement 5. Time Use The 12 Week Year will help you apply these disciplines in a way that leverages your knowledge and skills, and fosters consistent action. Vision: A compelling vision creates a clear picture of the future. It is critical that your business vision aligns with and enables your personal vision. This alignment ensures a powerful emotional connection that promotes a sustained commitment, and continual action. Planning: An eff ective plan clarifi es and focuses on the toppriority initiatives and actions needed to achieve the vision. A good plan is constructed in a manner that facilitates eff ective implementation. Process Control: Process control consists of a set of tools and events that align your daily actions with the critical actions in your plan. These tools and events ensure that more of your time is spent on strategic and money making activities. Measurement: Measurement drives the process. It is the anchor of reality. Eff ective measurement combines both lead and lag indicators that provide comprehensive feedback necessary for informed decision making. Time Use: Everything happens in the context of time. If you are not in control of your time, then you are not in control of your results. Using your time with clear intention is a must. It ’s important that you see the interconnectedness of these fi ve disciplines. If you don ’t have a clear, compelling vision, then the other disciplines really don ’t matter because you are not living a life by design but by chance. If you have a vision but no plan, then you have a pipe dream. If you have a vision and a focused plan but lack process control, then you ’ll have a lot of frustration, because some days you will execute and make progress and some days you won ’t. If you have those disciplines in place but lack the courage to keep score, then there is no way for you to know what ’s working and what isn ’t. There is no way for you to make game-time adjustments that can accelerate your success. Finally, if all of those are in place but you are not intentional about what you say yes to and what you say no to, then the day is controlling you. The Emotional Cycle of Change To apply the 12 Week Year will require change, and change is uncomfortable. It ’s helpful to understand the process we go through emotionally when faced with change, so we won’t be derailed by it. Whenever we decide to make a change in our lives, we experience an emotional roller coaster. Psychologists Don Kelley and Daryl Connor describe this phenomenon in a paper called The Emotional Cycle of Change. Kelley and Connor ’s emotional cycle of change (ECOC) includes fi ve stages of emotional experience, which we will explore here (with slight modifi cation based on our experience). Regardless of the change you choose to make, you will experience this cycle. You can plot new relationships, new purchases, new jobs, The fi rst stage of change is most often exciting, as we imagine all of the benefi ts and have not yet experienced any of the costs. Our emotions are driven by our uninformed optimism, which is in the positive emotional area of the graph. You see all of the benefi ts of the change and none of the downside, so this stage is fun. You are brainstorming ideas and strategizing how you might create the new level of results that you desire. Unfortunately, uninformed optimism doesn ’t last long. As you learn more about the reality of what it takes to change, positive emotions can quickly sour. The second stage of change, informed pessimism, is characterized by a shift to a negative emotional state. At this point, the benefi ts don ’t seem as real, important, or immediate, and the costs of the change are apparent. You start to question if the change is really worth the eff ort and begin to look for reasons to abandon the eff ort. If that’s not bad enough, things get worse. I call the third stage the valley of despair. This is when most people give up. All of the pain of change is felt and the benefi ts seem far away or less important—and there is a fast, easy way to end the discomfort: Going back to the way you used to do things. After all, you rationalize that it wasn’t so bad before. If you quit on change when you are in the valley of despair, you go back to the fi rst stage, uninformed optimism, which is a whole lot more fun than being in the valley! It is precisely at this stage—the valley of despair—that having a compelling vision is critical. Nearly all of us have had times in our lives when we wanted something so badly we were willing to pay any price and overcome any hurdle to get it. Maybe it was your fi rst car, maybe it was getting into that college you always dreamed of attending, maybe it was pursuing the person whom you wanted to marry, maybe it was your dream job—whatever it was, you wanted it so badly that you willingly paid the price of your own comfort to get it. Wanting passionately"
|
12 |
+
}
|