mirror of
https://github.com/ParisNeo/lollms.git
synced 2025-03-01 04:06:07 +00:00
done
This commit is contained in:
parent
9988ecf169
commit
9456e8049f
@ -489,6 +489,9 @@ class AIPersonality:
|
|||||||
- If return_explanation is False, returns a boolean (True for 'yes', False for 'no').
|
- If return_explanation is False, returns a boolean (True for 'yes', False for 'no').
|
||||||
- If return_explanation is True, returns a dictionary with the answer and explanation.
|
- If return_explanation is True, returns a dictionary with the answer and explanation.
|
||||||
"""
|
"""
|
||||||
|
if not callback:
|
||||||
|
callback=self.sink
|
||||||
|
|
||||||
prompt = f"{conditionning}\nQuestion: {question}\nContext: {context}\n"
|
prompt = f"{conditionning}\nQuestion: {question}\nContext: {context}\n"
|
||||||
|
|
||||||
template = """
|
template = """
|
||||||
@ -548,6 +551,8 @@ class AIPersonality:
|
|||||||
- If return_explanation is True, returns a JSON object with the selected choice index and an explanation.
|
- If return_explanation is True, returns a JSON object with the selected choice index and an explanation.
|
||||||
- Returns {"index": -1} if no match is found among the possible answers.
|
- Returns {"index": -1} if no match is found among the possible answers.
|
||||||
"""
|
"""
|
||||||
|
if not callback:
|
||||||
|
callback=self.sink
|
||||||
|
|
||||||
prompt = f"""
|
prompt = f"""
|
||||||
{conditionning}\n
|
{conditionning}\n
|
||||||
@ -607,6 +612,8 @@ class AIPersonality:
|
|||||||
- If return_explanation is False, returns a JSON object with only the ranked order.
|
- If return_explanation is False, returns a JSON object with only the ranked order.
|
||||||
- If return_explanation is True, returns a JSON object with the ranked order and explanations.
|
- If return_explanation is True, returns a JSON object with the ranked order and explanations.
|
||||||
"""
|
"""
|
||||||
|
if not callback:
|
||||||
|
callback=self.sink
|
||||||
|
|
||||||
prompt = f"""
|
prompt = f"""
|
||||||
{conditionning}\n
|
{conditionning}\n
|
||||||
|
Loading…
x
Reference in New Issue
Block a user