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

Feature/summary #17

Merged
merged 20 commits into from
Mar 1, 2024
Merged

Feature/summary #17

merged 20 commits into from
Mar 1, 2024

Conversation

MiguelLopezCampos
Copy link
Collaborator

New features added:

  • New task available: Summarisation and prompts associated to this task.
  • Anthropic Claude v2 is now available by the Amazon Bedrock Service.
  • Changes in prompts building to allow inputs in some prompts fields even if they are not received by code parameter.
  • Readme updated with instructions to connect with AWS.
  • New parser for JSON parsing.

Angel Delgado Panadero and others added 20 commits February 2, 2024 13:10
* Add new models: OpenAI GPT3.5-Turbo and Azure OpenAI. Azure OpenAI allows for the embeddings model to be from a different endpoint

* Parser for the API generation and correction response

* add models, prompts and add to tests

* Changes:
- Change in base.py from prompts, formatting the prompt
- Change in test_prompts adding a new symbol to delete

* add data for examples

---------

Co-authored-by: Miguel Lopez <[email protected]>
- New task added.

New prompts added:
- json-summarizer in spanish and english

json_summarizer.py:
- New model  class for JSON summarization task. TODO: Fix the example and delete commented code

__init__.py:
- Added the new model in the init script

promptmeteo/parsers/__init__.py:
- New option for new type of task (json summarization).
- TODO: We must change it to use a new parser for JSON treatment.
prompts. New prompt for anthropic claude added and name changing for gpt 3.5 models.

pyproject.toml. Added boto3 in the requirements to connect with aws.

__init__.py. Name changing of the task

json_info_extraction.py:
- New file replacing json_summarizer.py with the new naming

/models/__init__.py:
- New model provider added for Bedrock

/models/bedrock.py:
- Class for Bedrock models.
- Only anthropic claude v2 integrated
- By the moment, huggingface embeddings

/parsers/__init__.py:
- Name changing of the parser

/tasks/task_builder.py:
- Name changing and summarization task included for new development.
- Added Summarizer class

json_info_extraction.py:
- Changes in the example and code comments.
- json_fields parameter removed due to it is implicit in fields_description

summarizer.py:
- New class for Summarization task

parsers/__init__.py:
- New parser added for summarization task (dummy parser)

new prompts for anthropic claude  summarization and minor changes in prompts

tests/tools/dictionary_checker:
- 'sample' word added in spanish dictionary because is a keyword for injecting.
- Change for region selection
- test_models.py: Added model Bedrock for unit test

- test_parsers.py: Added unit test for json parser.

- json_parser.py: Change in description
json_info_extraction.py:
- Adapted to new Base model building structure

summarizer.py:
- Adapted to new Base model building structure.

pyproject.toml:
- boto3 added
prompts/base.py:
- Change to allow to fill 'domain' field in prompt even if there is no 'prompt domain' param (same with prompt detail)
- Removal of JSON info extraction task
- Added in BedrockLLM model the option of kwargs argument to allow to select different arguments for boto3 client
- Change in test for models the region argument
@codecov-commenter
Copy link

codecov-commenter commented Feb 13, 2024

Codecov Report

Attention: 21 lines in your changes are missing coverage. Please review.

Comparison is base (09d4352) 85.01% compared to head (c38181b) 84.98%.
Report is 1 commits behind head on main.

Files Patch % Lines
promptmeteo/summarizer.py 57.77% 19 Missing ⚠️
promptmeteo/api_formatter.py 0.00% 1 Missing ⚠️
promptmeteo/models/bedrock.py 97.05% 1 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #17      +/-   ##
==========================================
- Coverage   85.01%   84.98%   -0.04%     
==========================================
  Files          41       44       +3     
  Lines        1395     1525     +130     
==========================================
+ Hits         1186     1296     +110     
- Misses        209      229      +20     
Flag Coverage Δ
pytest 84.98% <84.21%> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@chucheria chucheria merged commit 14d096a into main Mar 1, 2024
10 checks passed
@chucheria chucheria deleted the feature/summary branch March 1, 2024 12:45
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.

3 participants