Skip to content

Commit

Permalink
fix openai start zone generation
Browse files Browse the repository at this point in the history
  • Loading branch information
neph1 committed Sep 29, 2023
1 parent 774a253 commit decaeea
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tale/llm/llm_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -516,9 +516,11 @@ def generate_start_zone(self, location_desc: str, story_type: str, story_context
if self.backend == 'kobold_cpp':
request_body = self._kobold_generation_prompt(request_body)
request_body['prompt'] = prompt
request_body['max_length'] = 750
elif self.backend == 'openai':
request_body['messages'][1]['content'] = prompt
request_body['max_length'] = 750
request_body['max_tokens'] = 750

result = self.io_util.synchronous_request(request_body)
try:
json_result = json.loads(parse_utils.sanitize_json(result))
Expand Down

0 comments on commit decaeea

Please sign in to comment.