mirror of
https://github.com/sean1832/GPT-Brain
synced 2024-11-18 21:25:53 +00:00
fix bug: does not generate text first time setting up app
This commit is contained in:
parent
23374d6f78
commit
ba6ca390a1
@ -6,7 +6,7 @@ from modules import gpt_util as gpt
|
||||
|
||||
|
||||
openai.api_key = util.read_file(r'.user\API-KEYS.txt').strip()
|
||||
BRAIN_DATA = util.read_json_file(r'.user\brain-data.json')
|
||||
|
||||
prompt_dir = '.user/prompt'
|
||||
|
||||
|
||||
@ -29,7 +29,8 @@ def build(chunk_size=4000):
|
||||
|
||||
|
||||
def run_answer(query, model, temp, max_tokens, top_p, freq_penl, pres_penl, chunk_count):
|
||||
results = gpt.search_chunks(query, BRAIN_DATA, chunk_count)
|
||||
brain_data = util.read_json_file(r'.user\brain-data.json')
|
||||
results = gpt.search_chunks(query, brain_data, chunk_count)
|
||||
answers = []
|
||||
for result in results:
|
||||
my_info = util.read_file(f'{prompt_dir}/my-info.txt')
|
||||
|
Loading…
Reference in New Issue
Block a user