Skip to content
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

Open
wants to merge 32 commits into
base: dev
Choose a base branch
from
Open

Structured Output Revisions #17

wants to merge 32 commits into from

Conversation

djohan12
Copy link
Collaborator

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

Jonathan Granda Acaro and others added 29 commits August 7, 2024 14:26
…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.
… 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
@chowington chowington self-requested a review November 8, 2024 23:31
@chowington chowington removed their assignment Nov 8, 2024
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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you remove these #TODOs, please? Thanks!

Comment on lines -1854 to +1896
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
)
Copy link
Collaborator

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
Copy link
Collaborator

@chowington chowington Nov 8, 2024

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"?

Comment on lines -1640 to +1659
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
)


Copy link
Collaborator

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

Comment on lines -786 to +787
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()
Copy link
Collaborator

@chowington chowington Nov 9, 2024

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

Comment on lines -872 to +870
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
)
Copy link
Collaborator

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

Comment on lines -2449 to +2489
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
)
Copy link
Collaborator

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

@chowington
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants