Skip to content

Add complex Json Example #738

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

omkenge
Copy link
Contributor

@omkenge omkenge commented Apr 24, 2025

No description provided.

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@github-actions github-actions bot added status:awaiting review PR awaiting review from a maintainer component:examples Issues/PR referencing examples folder labels Apr 24, 2025
@omkenge
Copy link
Contributor Author

omkenge commented Apr 29, 2025

cc @Giom-V

@@ -11,7 +11,7 @@
},
Copy link
Collaborator

@Giom-V Giom-V May 6, 2025

Choose a reason for hiding this comment

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

Line #7.    Generate list of entities in text based on the following Python class structure:

While you're updating that notebook, can you improve the readability by adding some indentation in the long texts? Something like

prompt = f"""
    Generate list of entities in text based on the following Python class structure:


    class CategoryEnum(str, Enum):
        Person = 'Person'
        Company = 'Company'
        State = 'State'
        City = 'City'


    class Entity(TypedDict):
        name: str
        category: CategoryEnum


    class Entities(TypedDict):
        entities: list[Entity]


    {entity_recognition_text}
"""

Also add a line before the model selector (or better, move it earlier).


Reply via ReviewNB

@@ -11,7 +11,7 @@
},
Copy link
Collaborator

@Giom-V Giom-V May 6, 2025

Choose a reason for hiding this comment

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

Line #23.    MODEL_ID = "gemini-2.0-flash" # @param ["gemini-2.0-flash-lite","gemini-2.0-flash","gemini-2.5-pro-exp-03-25"] {"allow-input":true, isTemplate: true}

Can you add the flash 2.5 model in the list?


Reply via ReviewNB

@@ -11,7 +11,7 @@
},
Copy link
Collaborator

@Giom-V Giom-V May 6, 2025

Choose a reason for hiding this comment

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

I think you should add a new title like "More complex example".


Reply via ReviewNB

@@ -11,7 +11,7 @@
},
Copy link
Collaborator

@Giom-V Giom-V May 6, 2025

Choose a reason for hiding this comment

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

Line #6.    During the 2024 Global Tech Forum in San Francisco, California, Dr. Aisha Rahman, Chief AI Officer at Amazon Web Services (AWS),

Can you improve indentation like before?


Reply via ReviewNB

@Giom-V
Copy link
Collaborator

Giom-V commented May 6, 2025

Thanks @omkenge for the submission. I left some minor comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:examples Issues/PR referencing examples folder status:awaiting review PR awaiting review from a maintainer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants