Skip to content

Commit

Permalink
Merge pull request #36 from neph1/openai_zone_generation_hotifx
Browse files Browse the repository at this point in the history
fix openai start zone generation
  • Loading branch information
neph1 authored Sep 29, 2023
2 parents 7d3e5fc + decaeea commit a9e39b8
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 a9e39b8

Please sign in to comment.