Comments (6)
Good idea. Additional thoughts:
- we don't need to call it "conversation mode" since using a history file is already conversational.
- name this argument
--history
, the usage would be likeai --history /path/to/history.json <other args>
, if an additional-w
is added, the history.json would be updated with the new messages input and generated in this call - the content of
history.json
would be the dump ofChatSession.messages
which is an array of dict items
Should be implemented in a day or two
from ai.py.
works like a charm :D
from ai.py.
ChatGPT via ai.py is now implemented in 3 modes of work "FreeTalk" : talk to it like a human, "Keyword": react only if a certain word is used and as "GapFiller": helping out with a reaction in case no local result is processed.
from ai.py.
I made it, but after further consideration, I didn't make --history
to imply conversation mode, so -c
is still needed to achieve your requirement. See the example below:
ai --history history.json -w -c 'remeber that a = 1, I will ask you later'
Sure, I'll be here. Feel free to ask me anything you need help with later on.
ai --history history.json -w -c 'what is a + 2 in short?'
a + 2 is equal to 3 since a was previously defined as 1.
history.json after running the two commands:
[
{
"role": "user",
"content": "remeber that a = 1, I will ask you later"
},
{
"role": "assistant",
"content": "Sure, I'll be here. Feel free to ask me anything you need help with later on."
},
{
"role": "user",
"content": "what is a + 2 in short?"
},
{
"role": "assistant",
"content": "a + 2 is equal to 3 since a was previously defined as 1."
}
]
from ai.py.
and how does the script know, which role it should use?
from ai.py.
ahh ok, forget the question.
from ai.py.
Related Issues (6)
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 ai.py.