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

feat: Enable GPT-4 in OpenAIPrompt #2248

Merged
merged 10 commits into from
Jul 16, 2024

Conversation

sss04
Copy link
Contributor

@sss04 sss04 commented Jul 9, 2024

Related Issues/PRs

None.

What changes are proposed in this pull request?

Enabling use of GPT-4 in OpenAIPrompt by using OpenAIChatCompletions within it. This change switches to OpenAIChatCompletion if using gpt-4, and uses OpenAICompletion for all other models.

How is this patch tested?

The currently existing tests for OpenAIPrompt in OpenAIPromptSuite were duplicated to ensure that they also worked for gpt-4.

  • I have written tests (not required for typo or doc fix) and confirmed the proposed feature/bug-fix/change works.

Does this PR change any dependencies?

  • No. You can skip this section.
  • Yes. Make sure the dependencies are resolved correctly, and list changes here.

Does this PR add a new feature? If so, have you added samples on website?

  • No. You can skip this section.
  • Yes. Make sure you have added samples following below steps.
  1. Find the corresponding markdown file for your new feature in website/docs/documentation folder.
    Make sure you choose the correct class estimators/transformers and namespace.
  2. Follow the pattern in markdown file and add another section for your new API, including pyspark, scala (and .NET potentially) samples.
  3. Make sure the DocTable points to correct API link.
  4. Navigate to website folder, and run yarn run start to make sure the website renders correctly.
  5. Don't forget to add <!--pytest-codeblocks:cont--> before each python code blocks to enable auto-tests for python samples.
  6. Make sure the WebsiteSamplesTests job pass in the pipeline.

@sss04
Copy link
Contributor Author

sss04 commented Jul 9, 2024

@microsoft-github-policy-service agree company="Microsoft"

@sss04 sss04 changed the title Enable GPT-4 in OpenAIPrompt feat: Enable GPT-4 in OpenAIPrompt Jul 9, 2024
Copy link
Collaborator

@mhamilton723 mhamilton723 left a comment

Choose a reason for hiding this comment

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

Amazing first PR of this! Just a few minor things!

sss04 and others added 4 commits July 10, 2024 13:17
…es/openai/OpenAIPrompt.scala


Update default system prompt

Co-authored-by: Mark Hamilton <[email protected]>
…es/openai/OpenAIPrompt.scala


remove unneeded comment

Co-authored-by: Mark Hamilton <[email protected]>
…es/openai/OpenAIPrompt.scala


remove unneeded comment

Co-authored-by: Mark Hamilton <[email protected]>
@sss04 sss04 marked this pull request as ready for review July 10, 2024 19:43
@sss04
Copy link
Contributor Author

sss04 commented Jul 10, 2024

/azp run

Copy link

Commenter does not have sufficient privileges for PR 2248 in repo microsoft/SynapseML

@mhamilton723
Copy link
Collaborator

/azp run

mhamilton723
mhamilton723 previously approved these changes Jul 11, 2024
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@codecov-commenter
Copy link

codecov-commenter commented Jul 11, 2024

Codecov Report

Attention: Patch coverage is 72.91667% with 13 lines in your changes missing coverage. Please review.

Project coverage is 82.25%. Comparing base (b19b991) to head (8839102).

Files Patch % Lines
...zure/synapse/ml/services/openai/OpenAIPrompt.scala 70.45% 13 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2248      +/-   ##
==========================================
- Coverage   86.05%   82.25%   -3.80%     
==========================================
  Files         327      327              
  Lines       16742    16773      +31     
  Branches     1509     1511       +2     
==========================================
- Hits        14407    13797     -610     
- Misses       2335     2976     +641     

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

@sss04
Copy link
Contributor Author

sss04 commented Jul 15, 2024

/azp run

Copy link

Commenter does not have sufficient privileges for PR 2248 in repo microsoft/SynapseML

@mhamilton723
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@sss04 sss04 enabled auto-merge (squash) July 16, 2024 04:06
@mhamilton723 mhamilton723 merged commit c033077 into microsoft:master Jul 16, 2024
59 of 67 checks passed
@sss04 sss04 deleted the shyamsai/gpt4gen branch July 16, 2024 16:17
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