Compare commits
2 Commits
fe4d28278d
...
46685112cf
| Author | SHA1 | Date | |
|---|---|---|---|
| 46685112cf | |||
| 9c3cc8cbea |
@ -33,23 +33,18 @@ class AI(Protocol):
|
||||
The base class for AI clients.
|
||||
"""
|
||||
|
||||
ID: str
|
||||
name: str
|
||||
config: AIConfig
|
||||
|
||||
def request(self,
|
||||
question: Message,
|
||||
chat: Chat,
|
||||
context: Chat,
|
||||
num_answers: int = 1,
|
||||
otags: Optional[set[Tag]] = None) -> AIResponse:
|
||||
"""
|
||||
Make an AI request. Parameters:
|
||||
* question: the question to ask
|
||||
* chat: the chat history to be added as context
|
||||
* num_answers: nr. of requested answers (corresponds
|
||||
to the nr. of messages in the 'AIResponse')
|
||||
* otags: the output tags, i. e. the tags that all
|
||||
returned messages should contain
|
||||
Make an AI request, asking the given question with the given
|
||||
context (i. e. chat history). The nr. of requested answers
|
||||
corresponds to the nr. of messages in the 'AIResponse'.
|
||||
"""
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
@ -48,7 +48,6 @@ def question_cmd(args: argparse.Namespace, config: Config) -> None:
|
||||
db_path=Path(config.db))
|
||||
# if it's a new question, create and store it immediately
|
||||
if args.ask or args.create:
|
||||
# FIXME: add sources to the question
|
||||
message = Message(question=Question(args.question),
|
||||
tags=args.ouput_tags, # FIXME
|
||||
ai=args.ai,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user