Comments (3)
I'm not sure why this happens but adding memories makes it work, I think the recent_memories
is empty in this case. Also, make sure using the guidance==0.0.63
for stability.
from generativeagent_llm.
I can confirm beeing able to add mem one by one, but run into the same issue when trying to do an myagent.updateStatus() . recent_memories is not empty
sam.retriever.memory_stream[-20:]
[Document(page_content='Sam is a Ph.D student, his major is CS', metadata={'importance': 7, 'created_at': datetime.datetime(2023, 7, 20, 7, 25, 16, 628631), 'last_accessed_at': datetime.datetime(2023, 7, 20, 7, 25, 16, 628631), 'buffer_idx': 0}),
Document(page_content='Sam likes computer', metadata={'importance': 1, 'created_at': datetime.datetime(2023, 7, 20, 7, 25, 16, 628631), 'last_accessed_at': datetime.datetime(2023, 7, 20, 7, 25, 16, 628631), 'buffer_idx': 1}),
Document(page_content='Sam lives with his friend, Bob', metadata={'importance': 1, 'created_at': datetime.datetime(2023, 7, 20, 7, 25, 16, 628631), 'last_accessed_at': datetime.datetime(2023, 7, 20, 7, 25, 16, 628631), 'buffer_idx': 2}),
Document(page_content="Sam's farther is a doctor", metadata={'importance': 1, 'created_at': datetime.datetime(2023, 7, 20, 7, 25, 16, 628631), 'last_accessed_at': datetime.datetime(2023, 7, 20, 7, 25, 16, 628631), 'buffer_idx': 3}),
Document(page_content='Sam has a dog, named Max', metadata={'importance': 1, 'created_at': datetime.datetime(2023, 7, 20, 7, 25, 16, 628631), 'last_accessed_at': datetime.datetime(2023, 7, 20, 7, 25, 16, 628631), 'buffer_idx': 4}),
Document(page_content='Wants to get his AI company to be successful.', metadata={'importance': 8, 'created_at': datetime.datetime(2023, 7, 20, 7, 25, 16, 628631), 'last_accessed_at': datetime.datetime(2023, 7, 20, 7, 25, 16, 628631), 'buffer_idx': 5}),
Document(page_content='Sam wake up in the morning', metadata={'importance': 1, 'created_at': datetime.datetime(2023, 7, 20, 7, 25, 16, 628631), 'last_accessed_at': datetime.datetime(2023, 7, 20, 7, 25, 16, 628631), 'buffer_idx': 6}),
Document(page_content='Sam really wants to get to work to get the marketing project for his AI company done', metadata={'importance': 3, 'created_at': datetime.datetime(2023, 7, 20, 7, 25, 16, 628631), 'last_accessed_at': datetime.datetime(2023, 7, 20, 7, 25, 16, 628631), 'buffer_idx': 7})]
print(sam.update_status())
Instruction:
Example for plan:
Here is {{name}}'s plan from now at 7:14:
[From 7:14 to 7:45]: Wake up and complete the morining routine
[From 7:45 to 8:35]: Eat breakfirst
[From 8:35 to 17:10]: Go to school and study
[From 17:10 to 22:30]: Play CSGO
[From 22:30 to 7:30]: Go to sleep
Input:
Today is {{current_time}}. Please make a plan today for {{name}} in broad strokes. Given the summary:
{{summary}}
Response:
Here is {{name}}'s plan from now at {{current_time}}:
[From {{now}} to {{gen 'to' pattern='[0-9]+:[0-9][0-9]' stop=']'}}]: {{gen 'task' top_k=30 top_p=0.18 repetition_penalty=1.15 temperature=1.99 stop='
'}}
{{#geneach 'items' num_iterations=3}}[From {{gen 'this.from' pattern='[0-9]+:[0-9][0-9]' stop=' '}} to {{gen 'this.to' pattern='[0-9]+:[0-9][0-9]' stop=']'}}]: {{gen 'this.task' top_k=30 top_p=0.18 repetition_penalty=1.15 temperature=1.99 stop='
'}}
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ in <cell line: 2>:6 │
│ │
│ /content/generativeAgent_LLM/server/generativeAgent.py:99 in update_status │
│ │
│ 96 │ │ │ │ need_replan = False │
│ 97 │ │ │ │ break │
│ 98 │ │ if need_replan: │
│ ❱ 99 │ │ │ new_plan = self.make_plan() │
│ 100 │ │ │ self.status = new_plan[0] │
│ 101 │ │ return self.status │
│ 102 │
│ │
│ /content/generativeAgent_LLM/server/generativeAgent.py:204 in make_plan │
│ │
│ 201 │ │ │ │ │ ) │
│ 202 │ │ │
│ 203 │ │ current_date = self.get_current_time() │
│ ❱ 204 │ │ list_task = result['items'] │
│ 205 │ │ list_task.insert(0, {'from': now, 'to': result['to'], 'task': result['task']}) │
│ 206 │ │ list_task_time = [] │
│ 207 │ │ for i, task_temp in enumerate(list_task): │
│ │
│ /usr/local/lib/python3.10/dist-packages/guidance/_program.py:470 in getitem │
│ │
│ 467 │ │ │ self._execute_complete.set() │
│ 468 │ │
│ 469 │ def getitem(self, key): │
│ ❱ 470 │ │ return self._variables[key] │
│ 471 │ │
│ 472 │ def contains(self, key): │
│ 473 │ │ return key in self._variables │
╰─────────────────────────────────────────────────────
from generativeagent_llm.
sorry for the confusion, I made sure to reinstall guidance 0.63 & it's working now after restarting the kernel 👍
from generativeagent_llm.
Related Issues (8)
- SafetensorError: Error while deserializing header: HeaderTooLarge
- How could i run this code with openai api, The OpenAI API does not support Guidance pattern controls. HOT 1
- Why the score add "1-vertor_relevance"
- BaseRetriever.get_relevant_documents() takes 2 positional arguments but 3 were given HOT 1
- Loop HOT 1
- Problem in loading models HOT 1
- Share a requirement.txt HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from generativeagent_llm.