-
Notifications
You must be signed in to change notification settings - Fork 822
Use just-built packages in the AI chat template by default #6096
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
Merged
Merged
Changes from 12 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
8ca041a
Use just-built packages in chat template by default
MackinnonBuck 0480077
Merge branch 'main' into mbuck/chat-template-build-improvements
MackinnonBuck e95f2f3
Update OllamaSharp version
MackinnonBuck 61731ff
Merge branch 'main' into mbuck/chat-template-build-improvements
MackinnonBuck 317e3af
Merge branch 'main' into mbuck/chat-template-build-improvements
jeffhandley 718197a
Resolve conflict in Versions.props for AI templates versions
jeffhandley a835894
Update MEAI Template test snapshot to use just-built packages
jeffhandley 0f5ad0c
Use pinned versions by default. Bump to latest versions.
jeffhandley abc357a
Merge branch 'main' into mbuck/chat-template-build-improvements
MackinnonBuck 09b0ce1
Remove non-template content from snapshot
MackinnonBuck 529e481
Cleanup for prev commit
MackinnonBuck dd0511d
Update test/ProjectTemplates/Microsoft.Extensions.AI.Templates.Integr…
MackinnonBuck 5c16cc8
New AddMessages API, fix snapshotting
MackinnonBuck 987652a
Merge branch 'mbuck/chat-template-build-improvements' of https://gith…
MackinnonBuck 81963d1
Update snapshot
MackinnonBuck 6cb1a19
Remove version suffix from snapshots
MackinnonBuck a2cee17
Use OS-specific exclude pattern path separators
MackinnonBuck e30aaf0
Fix typo
MackinnonBuck 443cb88
Merge branch 'main' into mbuck/chat-template-build-improvements
MackinnonBuck File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
<Project> | ||
|
||
<PropertyGroup> | ||
<_ChatWithCustomDataWebContentRoot>$(MSBuildThisFileDirectory)Microsoft.Extensions.AI.Templates\src\ChatWithCustomData\ChatWithCustomData.Web-CSharp\</_ChatWithCustomDataWebContentRoot> | ||
</PropertyGroup> | ||
|
||
<Target Name="ComputeGeneratedContentProperties"> | ||
<PropertyGroup> | ||
<!-- Define optional pinned versions of certain dependencies. --> | ||
<TemplatePinnedMicrosoftExtensionsAIVersion>9.3.0-preview.1.25161.3</TemplatePinnedMicrosoftExtensionsAIVersion> | ||
<TemplatePinnedMicrosoftEntityFrameworkCoreSqliteVersion>9.0.3</TemplatePinnedMicrosoftEntityFrameworkCoreSqliteVersion> | ||
|
||
<!-- By default, use pinned dependency versions. --> | ||
<TemplateUsePinnedMicrosoftExtensionsAIVersion Condition="'$(TemplateUsePinnedMicrosoftExtensionsAIVersion)' == ''">true</TemplateUsePinnedMicrosoftExtensionsAIVersion> | ||
<TemplateUsePinnedMicrosoftEntityFrameworkCoreSqliteVersion Condition="'$(TemplateUsePinnedMicrosoftEntityFrameworkCoreSqliteVersion)' == ''">true</TemplateUsePinnedMicrosoftEntityFrameworkCoreSqliteVersion> | ||
|
||
<!-- Apply pinned dependency versions if enabled. --> | ||
<TemplateMicrosoftExtensionsAIVersion Condition="'$(TemplateUsePinnedMicrosoftExtensionsAIVersion)' == 'true'">$(TemplatePinnedMicrosoftExtensionsAIVersion)</TemplateMicrosoftExtensionsAIVersion> | ||
<TemplateMicrosoftEntityFrameworkCoreSqliteVersion Condition="'$(TemplateUsePinnedMicrosoftEntityFrameworkCoreSqliteVersion)' == 'true'">$(TemplatePinnedMicrosoftEntityFrameworkCoreSqliteVersion)</TemplateMicrosoftEntityFrameworkCoreSqliteVersion> | ||
|
||
<!-- Fall back on default dependency versions if pinned versions were not applied. --> | ||
<TemplateMicrosoftExtensionsAIVersion Condition="'$(TemplateMicrosoftExtensionsAIVersion)' == ''">$(Version)</TemplateMicrosoftExtensionsAIVersion> | ||
<TemplateMicrosoftEntityFrameworkCoreSqliteVersion Condition="'$(TemplateMicrosoftEntityFrameworkCoreSqliteVersion)' == ''">$(MicrosoftEntityFrameworkCoreSqliteVersion)</TemplateMicrosoftEntityFrameworkCoreSqliteVersion> | ||
|
||
<_TemplateUsingJustBuiltPackages Condition="'$(TemplateMicrosoftExtensionsAIVersion)' == '$(Version)'">true</_TemplateUsingJustBuiltPackages> | ||
|
||
<!-- Specify package version variables used in template content. --> | ||
<GeneratedContentProperties> | ||
$(GeneratedContentProperties); | ||
|
||
<!-- Repo properties --> | ||
ArtifactsShippingPackagesDir=$(ArtifactsShippingPackagesDir); | ||
|
||
<!-- Package version properties --> | ||
OllamaSharpVersion=$(OllamaSharpVersion); | ||
MackinnonBuck marked this conversation as resolved.
Show resolved
Hide resolved
|
||
OpenAIVersion=$(OpenAIVersion); | ||
AzureAIProjectsVersion=$(AzureAIProjectsVersion); | ||
AzureAIOpenAIVersion=$(AzureAIOpenAIVersion); | ||
AzureIdentityVersion=$(AzureIdentityVersion); | ||
MicrosoftEntityFrameworkCoreSqliteVersion=$(TemplateMicrosoftEntityFrameworkCoreSqliteVersion); | ||
MicrosoftExtensionsAIVersion=$(TemplateMicrosoftExtensionsAIVersion); | ||
MicrosoftSemanticKernelCoreVersion=$(MicrosoftSemanticKernelCoreVersion); | ||
PdfPigVersion=$(PdfPigVersion); | ||
SystemLinqAsyncVersion=$(SystemLinqAsyncVersion); | ||
AzureSearchDocumentsVersion=$(AzureSearchDocumentsVersion); | ||
MicrosoftSemanticKernelConnectorsAzureAISearchVersion=$(MicrosoftSemanticKernelConnectorsAzureAISearchVersion); | ||
</GeneratedContentProperties> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<GeneratedContent | ||
Include="$(_ChatWithCustomDataWebContentRoot)ChatWithCustomData.Web-CSharp.csproj.in" | ||
OutputPath="$(_ChatWithCustomDataWebContentRoot)ChatWithCustomData.Web-CSharp.csproj" /> | ||
|
||
<!-- The following content only gets generated when using just-built packages --> | ||
<_GeneratedContentEnablingJustBuiltPackages | ||
Include="$(_ChatWithCustomDataWebContentRoot)NuGet.config.in" | ||
OutputPath="$(_ChatWithCustomDataWebContentRoot)NuGet.config" /> | ||
<_GeneratedContentEnablingJustBuiltPackages | ||
Include="$(_ChatWithCustomDataWebContentRoot)Directory.Build.targets.in" | ||
OutputPath="$(_ChatWithCustomDataWebContentRoot)Directory.Build.targets" /> | ||
|
||
<GeneratedContent | ||
Include="@(_GeneratedContentEnablingJustBuiltPackages)" | ||
Condition="'$(_TemplateUsingJustBuiltPackages)' == 'true'" /> | ||
<GeneratedContentToDelete | ||
Include="@(_GeneratedContentEnablingJustBuiltPackages)" | ||
Condition="'$(_TemplateUsingJustBuiltPackages)' != 'true'" /> | ||
</ItemGroup> | ||
</Target> | ||
|
||
</Project> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
...Templates/src/ChatWithCustomData/ChatWithCustomData.Web-CSharp/Directory.Build.targets.in
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<!-- | ||
This file only exists to support functionality allowing running the template locally. | ||
It will not get included in the built project template. | ||
--> | ||
<Project> | ||
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.targets', '$(MSBuildThisFileDirectory)../'))" /> | ||
|
||
<Target | ||
Name="_EnsurePackagesBuiltLocally" | ||
BeforeTargets="Restore"> | ||
|
||
<Error | ||
Condition="!Exists('${ArtifactsShippingPackagesDir}')" | ||
Text="Repo packages must be built locally before running this project. See src/ProjectTemplates/README.md for more info." /> | ||
</Target> | ||
</Project> |
15 changes: 15 additions & 0 deletions
15
...ensions.AI.Templates/src/ChatWithCustomData/ChatWithCustomData.Web-CSharp/NuGet.config.in
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- | ||
This file only exists to allow locally-built packages to be used when running the template locally. | ||
It will not get included in the built project template. | ||
--> | ||
<configuration> | ||
<packageSources> | ||
<add key="local-shipping" value="${ArtifactsShippingPackagesDir}" /> | ||
</packageSources> | ||
<packageSourceMapping> | ||
<packageSource key="local-shipping"> | ||
<package pattern="*" /> | ||
</packageSource> | ||
</packageSourceMapping> | ||
</configuration> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.