-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Structured Output Revisions #17
base: dev
Are you sure you want to change the base?
Conversation
… and rescue scenario
…to jonathan-dev-rebase Merging Connor H's updates on adding structured output, and removing duplicate requests in getting a task fro each our of the day.
…research/agentic_collab into henry-dev-rebase
… and firehouse location. Merge remote-tracking branch 'origin/chowington-search-and-rescue' into jonathan-dev-rebase
… run_gpt_prompt.py using List[str] throught the file, installed the new requirements.txt, added new gpt-key
…research/agentic_collab into henry-dev-rebase
if debug or verbose: | ||
print_run_prompts(prompt_template, persona, gpt_param, | ||
prompt_input, prompt, output) | ||
|
||
return output, [output, prompt, gpt_param, prompt_input, fail_safe] | ||
|
||
#TODO |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you remove these #TODO
s, please? Thanks!
output = ChatGPT_safe_generate_response(prompt, example_output, special_instruction, 3, fail_safe, | ||
__chat_func_validate, __chat_func_clean_up, True) | ||
output = generate_structured_response( | ||
prompt, | ||
gpt_param, | ||
Poignancy, | ||
3, | ||
fail_safe, | ||
__func_validate, | ||
__func_clean_up, | ||
True | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's wait until @LemmyTron can get his structured outputs conversion of ChatGPT_safe_generate_response
so we can use that instead of generate_structured_response
|
||
#TODO | ||
class Conversation(BaseModel): | ||
log:str |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe "summary" would make more sense, rather than "log"?
output = ChatGPT_safe_generate_response(prompt, example_output, special_instruction, 3, fail_safe, | ||
__chat_func_validate, __chat_func_clean_up, True) | ||
output = ChatGPT_safe_generate_response( | ||
prompt, | ||
gpt_param, | ||
Conversation, | ||
3, | ||
fail_safe, | ||
__func_validate, | ||
__func_clean_up, | ||
True | ||
) | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ChatGPT_safe_generate_response
doesn't take a response format--this probably throws an error? Let's wait until Henry has finished his function
def __func_clean_up(gpt_response, prompt=""): | ||
return ''.join(gpt_response.split("---")[0]).strip() | ||
def __func_clean_up(gpt_response:GameObject, prompt=""): | ||
return ''.join(gpt_response.object.split("---")[0]).strip() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like you forgot to replace safe_generate_response
with generate_structured_response
below these lines
output = ChatGPT_safe_generate_response(prompt, example_output, special_instruction, 3, fail_safe, | ||
__chat_func_validate, __chat_func_clean_up, True) | ||
output = ChatGPT_safe_generate_response( | ||
prompt, | ||
gpt_param, | ||
Pronunciatio, | ||
3, | ||
fail_safe, | ||
__func_validate, | ||
__func_clean_up, | ||
True | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here--can't use this function for structured outputs
output = ChatGPT_safe_generate_response(prompt, example_output, special_instruction, 3, fail_safe, | ||
__chat_func_validate, __chat_func_clean_up, True) | ||
output = ChatGPT_safe_generate_response( | ||
prompt, | ||
gpt_param, | ||
Idea_Summary, | ||
3, | ||
fail_safe, | ||
__func_validate, | ||
__func_clean_up, | ||
True | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here--can't use this function for structured outputs
Thanks for the PR, Daniel! Looks like you had merged Henry's and Jonathan's branches into your own--that makes it difficult for me to tell which are actually your changes, unfortunately. I think we should wait until they have merged their PRs before merging this one |
Structured Output Changes for
run_gpt_prompt_generate_whisper_inner_thought
run_gpt_prompt_event_poignancy
run_gpt_prompt_summarize_conversation
run_gpt_prompt_action_game_object
run_gpt_prompt_pronunciation
run_gpt_prompt_summarize_ideas