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

Azure OpenAI Service Chat Sample initial commit #46

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

Conversation

miguelverweij
Copy link

By submitting this pull request, you agree to the contribution guidelines

If you aren't familiar with how to contribute to open-source repositories using GitHub, or if you find the instructions on this page confusing, sign up for one of our Sharing is Caring events. It's completely free, and we'll guide you through the process.

To submit a pull request with multiple authors, make sure that at least one commit is a co-authored commit by adding a Co-authored-by: trailer to the commit's message. E.g.: Co-authored-by: name <name@example.com>

Put an x in all the items that apply ([x], without spaces), make notes next to any that haven't been addressed.

  • Bug fix?
  • New sample?
  • Related issues: fixes #X, partially #Y, mentioned in #Z
  • Needs API permissions?
  • Has other prerequisites? (E.g. requires a list, document library, etc.)

What's in this Pull Request?

A new sample solution, Azure OpenAI Service Chat, is added to the samples folder.

Checklist

This checklist is mostly useful as a reminder of small things that can easily be forgotten – it is meant as a helpful tool rather than hoops to jump through.

Put an x in all the items that apply ([x], no spaces), make notes next to any that haven't been addressed.

  • My pull request affects only ONE sample.
  • I have updated the README file.
  • My README has at least one static high-resolution screenshot (i.e. not a GIF)
  • My README contains complete setup instructions, including pre-requisites and permissions required

@Katerina-Chernevskaya
Copy link
Contributor

Hi @miguelverweij,

Thank you for your submission!

While attempting to import the solution, I encountered a block due to missing dependencies. Below is the log. Could you please review the source code and update it to resolve this issue?

Thank you!

[{"SolutionValidationResultType":"Error","Message":"The following solution cannot be imported: ChatGPT. Some dependencies are missing. The missing dependencies are : <MissingDependencies><MissingDependency><Required type=\"1\" schemaName=\"cr84c_promptlibrary\" displayName=\"Prompt Library\" solution=\"PromptManager (1.0.0.6)\" /><Dependent type=\"1\" schemaName=\"cr84c_promptlibrary\" displayName=\"Prompt Library\" /></MissingDependency><MissingDependency><Required type=\"1\" schemaName=\"cr84c_promptlibrary\" displayName=\"Prompt Library\" solution=\"PromptManager (1.0.0.6)\" /><Dependent type=\"10\" schemaName=\"ppchal_ppchal_chat_Prompt_cr84c_promptlibrary\" displayName=\"ppchal_ppchal_chat_Prompt_cr84c_promptlibrary\" parentSchemaName=\"cr84c_promptlibrary\" parentDisplayName=\"Prompt Library\" /></MissingDependency><MissingDependency><Required type=\"1\" schemaName=\"cr84c_promptlibrary\" displayName=\"Prompt Library\" solution=\"PromptManager (1.0.0.6)\" /><Dependent type=\"300\" schemaName=\"ppchal_chatgpt_0a0e7\" displayName=\"Azure OpenAI Service Chat\" /></MissingDependency><MissingDependency><Required type=\"1\" schemaName=\"ppchal_systemmessagetemplate\" displayName=\"System Message Template\" solution=\"Active\" /><Dependent type=\"300\" schemaName=\"ppchal_chatgpt_0a0e7\" displayName=\"Azure OpenAI Service Chat\" /></MissingDependency><MissingDependency><Required type=\"2\" schemaName=\"cr84c_name\" displayName=\"Name\" parentSchemaName=\"cr84c_promptlibrary\" parentDisplayName=\"Prompt Library\" solution=\"PromptManager (1.0.0.6)\" /><Dependent type=\"10\" schemaName=\"ppchal_ppchal_chat_Prompt_cr84c_promptlibrary\" displayName=\"ppchal_ppchal_chat_Prompt_cr84c_promptlibrary\" parentSchemaName=\"cr84c_promptlibrary\" parentDisplayName=\"Prompt Library\" /></MissingDependency><MissingDependency><Required type=\"2\" schemaName=\"cr84c_promptlibraryid\" displayName=\"Prompt Library\" parentSchemaName=\"cr84c_promptlibrary\" parentDisplayName=\"Prompt Library\" solution=\"PromptManager (1.0.0.6)\" /><Dependent type=\"10\" schemaName=\"ppchal_ppchal_chat_Prompt_cr84c_promptlibrary\" displayName=\"ppchal_ppchal_chat_Prompt_cr84c_promptlibrary\" parentSchemaName=\"cr84c_promptlibrary\" parentDisplayName=\"Prompt Library\" /></MissingDependency><MissingDependency><Required type=\"372\" schemaName=\"ppchal_azureopenaiservice\" displayName=\"AzureOpenAIService\" solution=\"Active\" id=\"{76b87ad4-2b1d-44cf-965c-df67c01b8666}\" /><Dependent type=\"29\" displayName=\"Get-Summary\" id=\"{718b1c3a-6a13-ee11-8f6d-000d3a292ad4}\" /></MissingDependency><MissingDependency><Required type=\"372\" schemaName=\"ppchal_azureopenaiservice\" displayName=\"AzureOpenAIService\" solution=\"Active\" id=\"{76b87ad4-2b1d-44cf-965c-df67c01b8666}\" /><Dependent type=\"29\" displayName=\"Get-Completion\" id=\"{7c90eb1e-2013-ee11-8f6d-000d3a292ad4}\" /></MissingDependency><MissingDependency><Required type=\"372\" schemaName=\"ppchal_azureopenaiservice\" displayName=\"AzureOpenAIService\" solution=\"Active\" id=\"{76b87ad4-2b1d-44cf-965c-df67c01b8666}\" /><Dependent type=\"300\" schemaName=\"ppchal_chatgpt_0a0e7\" displayName=\"Azure OpenAI Service Chat\" /></MissingDependency><MissingDependency><Required type=\"connectionreference\" displayName=\"admin_InnovationBacklogCDSCurrent\" solution=\"CenterofExcellenceInnovationBacklog (3.1)\" id.connectionreferencelogicalname=\"admin_InnovationBacklogCDSCurrent\" /><Dependent type=\"29\" displayName=\"Get-Completion\" id=\"{7c90eb1e-2013-ee11-8f6d-000d3a292ad4}\" /></MissingDependency><MissingDependency><Required type=\"connectionreference\" displayName=\"ppchal_sharedazureopenaiservice5f534785e02bede9d05fae562e10a2de687a_7cd22\" solution=\"Active\" id.connectionreferencelogicalname=\"ppchal_sharedazureopenaiservice5f534785e02bede9d05fae562e10a2de687a_7cd22\" /><Dependent type=\"29\" displayName=\"Get-Summary\" id=\"{718b1c3a-6a13-ee11-8f6d-000d3a292ad4}\" /></MissingDependency><MissingDependency><Required type=\"connectionreference\" displayName=\"ppchal_sharedazureopenaiservice5f534785e02bede9d05fae562e10a2de687a_7cd22\" solution=\"Active\" id.connectionreferencelogicalname=\"ppchal_sharedazureopenaiservice5f534785e02bede9d05fae562e10a2de687a_7cd22\" /><Dependent type=\"29\" displayName=\"Get-Completion\" id=\"{7c90eb1e-2013-ee11-8f6d-000d3a292ad4}\" /></MissingDependency></MissingDependencies> , ProductUpdatesOnly : False","ErrorCode":-2147188707,"AdditionalInfo":null}]

Kind regards,
Katerina Chernevskaya

@miguelverweij
Copy link
Author

miguelverweij commented Oct 30, 2023

Hi Katerina,

There is a solution, Prompt Library, that is a prerequisite. I have stated this in the Readme file. Initially I had a similar functionality in my own solution. Later I saw that April Dunham created a fabulous solution to store prompts. Much more advanced than what I created. I though about adding the chat functionality to her solution and make a PR, but I thought a separate solution would not interfere that install process.

So the solution would be to install that solution first.
I hope this clarifies and resolves the issue.

@Katerina-Chernevskaya
Copy link
Contributor

Hi @miguelverweij,

Thank you for the clarification! I will try again and if everything will be ok I will change the link in prerequisites before the merge, because now it redirects to your solution, not to the Prompt Library by April Dunnam. I will let you know once I complete testing.
image

Regards,
Kate

@Katerina-Chernevskaya
Copy link
Contributor

Hi @miguelverweij,

The new attempt after install the Prompt Library solution, failed again due to missing dependencies. Please review the log below and update your source code to resolve this issue.
Thank you!

[{"SolutionValidationResultType":"Error","Message":"The following solution cannot be imported: ChatGPT. Some dependencies are missing. The missing dependencies are : <MissingDependencies><MissingDependency><Required type=\"1\" schemaName=\"ppchal_systemmessagetemplate\" displayName=\"System Message Template\" solution=\"Active\" /><Dependent type=\"300\" schemaName=\"ppchal_chatgpt_0a0e7\" displayName=\"Azure OpenAI Service Chat\" /></MissingDependency><MissingDependency><Required type=\"372\" schemaName=\"ppchal_azureopenaiservice\" displayName=\"AzureOpenAIService\" solution=\"Active\" id=\"{76b87ad4-2b1d-44cf-965c-df67c01b8666}\" /><Dependent type=\"29\" displayName=\"Get-Summary\" id=\"{718b1c3a-6a13-ee11-8f6d-000d3a292ad4}\" /></MissingDependency><MissingDependency><Required type=\"372\" schemaName=\"ppchal_azureopenaiservice\" displayName=\"AzureOpenAIService\" solution=\"Active\" id=\"{76b87ad4-2b1d-44cf-965c-df67c01b8666}\" /><Dependent type=\"29\" displayName=\"Get-Completion\" id=\"{7c90eb1e-2013-ee11-8f6d-000d3a292ad4}\" /></MissingDependency><MissingDependency><Required type=\"372\" schemaName=\"ppchal_azureopenaiservice\" displayName=\"AzureOpenAIService\" solution=\"Active\" id=\"{76b87ad4-2b1d-44cf-965c-df67c01b8666}\" /><Dependent type=\"300\" schemaName=\"ppchal_chatgpt_0a0e7\" displayName=\"Azure OpenAI Service Chat\" /></MissingDependency><MissingDependency><Required type=\"connectionreference\" displayName=\"admin_InnovationBacklogCDSCurrent\" solution=\"CenterofExcellenceInnovationBacklog (3.1)\" id.connectionreferencelogicalname=\"admin_InnovationBacklogCDSCurrent\" /><Dependent type=\"29\" displayName=\"Get-Completion\" id=\"{7c90eb1e-2013-ee11-8f6d-000d3a292ad4}\" /></MissingDependency><MissingDependency><Required type=\"connectionreference\" displayName=\"ppchal_sharedazureopenaiservice5f534785e02bede9d05fae562e10a2de687a_7cd22\" solution=\"Active\" id.connectionreferencelogicalname=\"ppchal_sharedazureopenaiservice5f534785e02bede9d05fae562e10a2de687a_7cd22\" /><Dependent type=\"29\" displayName=\"Get-Summary\" id=\"{718b1c3a-6a13-ee11-8f6d-000d3a292ad4}\" /></MissingDependency><MissingDependency><Required type=\"connectionreference\" displayName=\"ppchal_sharedazureopenaiservice5f534785e02bede9d05fae562e10a2de687a_7cd22\" solution=\"Active\" id.connectionreferencelogicalname=\"ppchal_sharedazureopenaiservice5f534785e02bede9d05fae562e10a2de687a_7cd22\" /><Dependent type=\"29\" displayName=\"Get-Completion\" id=\"{7c90eb1e-2013-ee11-8f6d-000d3a292ad4}\" /></MissingDependency></MissingDependencies> , ProductUpdatesOnly : False","ErrorCode":-2147188707,"AdditionalInfo":null}]

Regards,
Katerina Chernevskaya

updated Prompt Library link
updated Azure OpenAI Service custom connector link
@miguelverweij
Copy link
Author

I checked what is going on, and I think I have to apologize. I haven't tested importing the solution properly. I just did and I know what to fix. I will update the files tomorrow. Sorry for the inconvenience.

@miguelverweij
Copy link
Author

All files are ready now.
I removed a data source from the Canvas App. This was causing dependencies.
I also moved the Custom Connector into a separate solution. This solution should be imported first. You should first create a connection on this connector to map it to a connection reference. I have updated the README file accordingly.
If you will try it in your own environment, you might want to remove the custom connector you manually created earlier.

Again sorry for the inconvenience.

@Katerina-Chernevskaya
Copy link
Contributor

Hi @miguelverweij,

I've successfully compiled the solutions from the source code. However, I've encouraged an issue in the Azure OpenAI Service Chat app. When I try to create a new chat in the app, the option doesn't seem to be available:
image

I made sure to complete all the steps listed in your guide, including the prerequisites.

Could you please provide any insights or additional guidance on how to resolve this and successfully create a new chat?

Thank you in advance!

Regards,
Katerina Ch.

@Katerina-Chernevskaya Katerina-Chernevskaya added the Needs Attention Something needs to be fixed with the PR before merging label Dec 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Attention Something needs to be fixed with the PR before merging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants