Merge branch '46-add-licence' into 'main'

Resolve "Add licence"

Closes #46 and #49

See merge request products/mindwork-ai-studio!6
This commit is contained in:
Thorsten 2024-05-26 12:26:26 +00:00
commit 275cb2ac05
13 changed files with 353 additions and 12 deletions

110
LICENSE Normal file
View File

@ -0,0 +1,110 @@
# Functional Source License, Version 1.1, MIT Future License
## Abbreviation
FSL-1.1-MIT
## Notice
Copyright 2024 Thorsten Sommer
## Terms and Conditions
### Licensor ("We")
The party offering the Software under these Terms and Conditions.
### The Software
The "Software" is each version of the software that we make available under
these Terms and Conditions, as indicated by our inclusion of these Terms and
Conditions with the Software.
### License Grant
Subject to your compliance with this License Grant and the Patents,
Redistribution and Trademark clauses below, we hereby grant you the right to
use, copy, modify, create derivative works, publicly perform, publicly display
and redistribute the Software for any Permitted Purpose identified below.
### Permitted Purpose
A Permitted Purpose is any purpose other than a Competing Use. A Competing Use
means making the Software available to others in a commercial product or
service that:
1. substitutes for the Software;
2. substitutes for any other product or service we offer using the Software
that exists as of the date we make the Software available; or
3. offers the same or substantially similar functionality as the Software.
Permitted Purposes specifically include using the Software:
1. for your internal use and access;
2. for non-commercial education;
3. for non-commercial research; and
4. in connection with professional services that you provide to a licensee
using the Software in accordance with these Terms and Conditions.
### Patents
To the extent your use for a Permitted Purpose would necessarily infringe our
patents, the license grant above includes a license under our patents. If you
make a claim against any party that the Software infringes or contributes to
the infringement of any patent, then your patent license to the Software ends
immediately.
### Redistribution
The Terms and Conditions apply to all copies, modifications and derivatives of
the Software.
If you redistribute any copies, modifications or derivatives of the Software,
you must include a copy of or a link to these Terms and Conditions and not
remove any copyright notices provided in or with the Software.
### Disclaimer
THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR
PURPOSE, MERCHANTABILITY, TITLE OR NON-INFRINGEMENT.
IN NO EVENT WILL WE HAVE ANY LIABILITY TO YOU ARISING OUT OF OR RELATED TO THE
SOFTWARE, INCLUDING INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES,
EVEN IF WE HAVE BEEN INFORMED OF THEIR POSSIBILITY IN ADVANCE.
### Trademarks
Except for displaying the License Details and identifying us as the origin of
the Software, you have no right under these Terms and Conditions to use our
trademarks, trade names, service marks or product names.
## Grant of Future License
We hereby irrevocably grant you an additional license to use the Software under
the MIT license that is effective on the second anniversary of the date we make
the Software available. On or after that date, you may use the Software under
the MIT license, in which case the following will apply:
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

54
README.md Normal file
View File

@ -0,0 +1,54 @@
# MindWork AI Studio
MindWork AI Studio is a desktop application available for macOS, Windows, and Linux. It provides a unified chat interface for Large Language Models (LLMs). You bring your own API key for the respective LLM provider to use the models. The API keys are securely stored by the operating system.
**Key features:**
- **Free of charge**: The app is free to use, both for personal and commercial purposes.
- **Independence**: Users are not tied to any single provider. The initial version supports OpenAI models (like GPT-4o, GPT-4, GPT-4 Turbo, etc.). Future versions will support other providers such as Mistral or Google Gemini.
- **Unrestricted usage**: Unlike services like ChatGPT, which impose limits after intensive use, MindWork AI Studio offers unlimited usage through the providers API.
- **Cost-effective**: You only pay for what you use, which can be cheaper than monthly subscription services like ChatGPT Plus, especially if used infrequently. But beware, here be dragons: For extremely intensive usage, the API costs can be significantly higher. Unfortunately, providers currently do not offer a way to display current costs in the app. Therefore, check your account with the respective provider to see how your costs are developing. When available, use prepaid and set a cost limit.
- **Privacy**: Data entered in the app is not used for training by the providers because we are using the API.
- **Flexibility**: Choose the provider and model best suited for your current task.
**Ready to get started 🤩?** [Download the appropriate setup for your operating system here](https://github.com/MindWorkAI/AI-Studio/releases/latest).
## Support the Project
Thank you for using MindWork AI Studio and considering supporting its development 😀. Your support helps keep the project alive and ensures continuous improvements and new features.
You might make a one-time contribution or opt for monthly support. When you choose to make a one-time contribution, we would be thrilled to honor you by including your name in the app as a gesture of our gratitude 🤝. Monthly supporters will not only have their names featured in the app but will also enjoy additional perks with future releases 🙏. These perks may include ready-made prompt presets for various use cases and pre-built functions for the so-called function calling of the LLM, which will be directly integrated into the app.
Your support, whether big or small, keeps the wheels turning and is deeply appreciated ❤️.
## Planned Features
Here's an exciting look at some of the features we're planning to add to MindWork AI Studio in future releases:
- **More providers**: We plan to add support for additional LLM providers, such as Mistral and Google Gemini, giving you more options to choose from.
- **Persistent chats**: Your chats will be stored locally, allowing you to continue conversations at any time without starting from scratch.
- **Local LLMs**: We aim to support local LLMs, enabling you to use options like LM Studio, `ollama`, or `llama.cpp` for a more private and self-contained experience.
- **System prompts**: Integration of a system prompt library will allow you to control the behavior of the LLM with predefined prompts, ensuring consistency and efficiency.
- **Text replacement for better privacy**: Define keywords that will be replaced in your chats before sending content to the provider, enhancing your privacy.
- **Advanced interactions**: We're full of ideas for advanced interactions tailored for specific use cases, whether in a business context or for writers and other professionals.
Stay tuned for more updates and enhancements to make MindWork AI Studio even more powerful and versatile 🤩.
## Building
You just want to use the app? Then simply [download the appropriate setup for your operating system](https://github.com/MindWorkAI/AI-Studio/releases/latest). This chapter is intended for developers who want to modify and customize the code.
In order to build MindWork AI Studio from source instead of using the pre-built binaries, follow these steps:
1. Install the .NET 8 SDK.
2. Install the Rust compiler.
3. Install NuShell. This shell works on all operating systems and is required because the build script is written in NuShell.
4. Clone the repository.
5. Open a terminal with NuShell.
6. Navigate to the `/app/MindWork AI Studio` directory within the repository.
7. To build the current version, run `nu build.nu publish`.
- This will build the app for the current operating system, for both x64 (Intel, AMD) and ARM64 (e.g., Apple Silicon, Raspberry Pi).
- The setup program will be located in `runtime/target/release/bundle` afterward.
8. To prepare a new release, run `nu build.nu prepare <ACTION>`, where `<ACTION>` is either `patch`, `minor`, or `major`.
## License
MindWork AI Studio is licensed under the `FSL-1.1-MIT` license (functional source license). Heres a simple rundown of what that means for you:
- **Permitted Use**: Feel free to use, copy, modify, and share the software for your own projects, educational purposes, research, or even in professional services. The key is to use it in a way that doesn't compete with our offerings.
- **Competing Use**: Our only request is that you don't create commercial products or services that replace or compete with MindWork AI Studio or any of our other offerings.
- **No Warranties**: The software is provided "as is", without any promises from us about it working perfectly for your needs. While we strive to make it great, we can't guarantee it will be free of bugs or issues.
- **Future License**: Good news! The license for each release of MindWork AI Studio will automatically convert to an MIT license two years from its release date. This makes it even easier for you to use the software in the future.
For more details, refer to the [LICENSE](LICENSE) file. This license structure ensures you have plenty of freedom to use and enjoy the software while protecting our work.

View File

@ -1,3 +1,4 @@
@using AIStudio.Tools
@using MudBlazor @using MudBlazor
<MudCard Class="my-2 rounded-lg" Outlined="@true"> <MudCard Class="my-2 rounded-lg" Outlined="@true">
@ -35,7 +36,17 @@
} }
else else
{ {
<MudMarkdown Value="@textContent.Text"/> @if (this.Content.IsStreaming)
{
<MudText Typo="Typo.body1" Style="white-space: pre-wrap;">
@textContent.Text
</MudText>
}
else
{
<MudMarkdown Value="@textContent.Text" OverrideHeaderTypo="@Markdown.OverrideHeaderTypo"/>
}
} }
} }

View File

@ -1,4 +1,6 @@
@page "/about" @page "/about"
@using AIStudio.Tools
<MudText Typo="Typo.h3" Class="mb-2">About MindWork AI Studio</MudText> <MudText Typo="Typo.h3" Class="mb-2">About MindWork AI Studio</MudText>
<MudCard Class="mb-3"> <MudCard Class="mb-3">
@ -24,7 +26,7 @@
</MudCardContent> </MudCardContent>
</MudCard> </MudCard>
<MudExpansionPanels> <MudExpansionPanels Class="mb-3">
<MudExpansionPanel> <MudExpansionPanel>
<TitleContent> <TitleContent>
<div class="d-flex align-center"> <div class="d-flex align-center">
@ -47,4 +49,18 @@
</MudGrid> </MudGrid>
</ChildContent> </ChildContent>
</MudExpansionPanel> </MudExpansionPanel>
</MudExpansionPanels>
<MudExpansionPanels Class="mb-3">
<MudExpansionPanel>
<TitleContent>
<div class="d-flex align-center">
<MudIcon Icon="@Icons.Material.Filled.Verified" Size="Size.Medium" class="mr-3"/>
<MudText Typo="Typo.h6">License: FSL-1.1-MIT</MudText>
</div>
</TitleContent>
<ChildContent>
<MudMarkdown Value="@LICENSE" OverrideHeaderTypo="@Markdown.OverrideHeaderTypo"/>
</ChildContent>
</MudExpansionPanel>
</MudExpansionPanels> </MudExpansionPanels>

View File

@ -22,4 +22,117 @@ public partial class About : ComponentBase
private static string MudBlazorVersion => $"MudBlazor: v{META_DATA.MudBlazorVersion}"; private static string MudBlazorVersion => $"MudBlazor: v{META_DATA.MudBlazorVersion}";
private static string TauriVersion => $"Tauri: v{META_DATA.TauriVersion}"; private static string TauriVersion => $"Tauri: v{META_DATA.TauriVersion}";
}
private const string LICENSE = """
# Functional Source License, Version 1.1, MIT Future License
## Abbreviation
FSL-1.1-MIT
## Notice
Copyright 2024 Thorsten Sommer
## Terms and Conditions
### Licensor ("We")
The party offering the Software under these Terms and Conditions.
### The Software
The "Software" is each version of the software that we make available under
these Terms and Conditions, as indicated by our inclusion of these Terms and
Conditions with the Software.
### License Grant
Subject to your compliance with this License Grant and the Patents,
Redistribution and Trademark clauses below, we hereby grant you the right to
use, copy, modify, create derivative works, publicly perform, publicly display
and redistribute the Software for any Permitted Purpose identified below.
### Permitted Purpose
A Permitted Purpose is any purpose other than a Competing Use. A Competing Use
means making the Software available to others in a commercial product or
service that:
1. substitutes for the Software;
2. substitutes for any other product or service we offer using the Software
that exists as of the date we make the Software available; or
3. offers the same or substantially similar functionality as the Software.
Permitted Purposes specifically include using the Software:
1. for your internal use and access;
2. for non-commercial education;
3. for non-commercial research; and
4. in connection with professional services that you provide to a licensee
using the Software in accordance with these Terms and Conditions.
### Patents
To the extent your use for a Permitted Purpose would necessarily infringe our
patents, the license grant above includes a license under our patents. If you
make a claim against any party that the Software infringes or contributes to
the infringement of any patent, then your patent license to the Software ends
immediately.
### Redistribution
The Terms and Conditions apply to all copies, modifications and derivatives of
the Software.
If you redistribute any copies, modifications or derivatives of the Software,
you must include a copy of or a link to these Terms and Conditions and not
remove any copyright notices provided in or with the Software.
### Disclaimer
THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR
PURPOSE, MERCHANTABILITY, TITLE OR NON-INFRINGEMENT.
IN NO EVENT WILL WE HAVE ANY LIABILITY TO YOU ARISING OUT OF OR RELATED TO THE
SOFTWARE, INCLUDING INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES,
EVEN IF WE HAVE BEEN INFORMED OF THEIR POSSIBILITY IN ADVANCE.
### Trademarks
Except for displaying the License Details and identifying us as the origin of
the Software, you have no right under these Terms and Conditions to use our
trademarks, trade names, service marks or product names.
## Grant of Future License
We hereby irrevocably grant you an additional license to use the Software under
the MIT license that is effective on the second anniversary of the date we make
the Software available. On or after that date, you may use the Software under
the MIT license, in which case the following will apply:
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
""";
}

View File

@ -0,0 +1,16 @@
namespace AIStudio.Tools;
public static class Markdown
{
public static Typo OverrideHeaderTypo(Typo arg) => arg switch
{
Typo.h1 => Typo.h4,
Typo.h2 => Typo.h5,
Typo.h3 => Typo.h6,
Typo.h4 => Typo.h6,
Typo.h5 => Typo.h6,
Typo.h6 => Typo.h6,
_ => arg
};
}

View File

@ -41,6 +41,8 @@ def "main metadata" []: nothing -> nothing {
update_mudblazor_version update_mudblazor_version
update_tauri_version update_tauri_version
update_project_commit_hash update_project_commit_hash
update_license_year "../../LICENSE"
update_license_year "Components/Pages/About.razor.cs"
} }
def "main fix_web_assets" []: nothing -> nothing { def "main fix_web_assets" []: nothing -> nothing {
@ -247,6 +249,25 @@ def update_tauri_version []: nothing -> nothing {
$meta_lines | save --raw --force ../../metadata.txt $meta_lines | save --raw --force ../../metadata.txt
} }
def update_license_year [licence_file: string] {
let current_year = (date now | date to-timezone UTC | format date "%Y")
let license_text = open --raw $licence_file | lines
print $"Updating the license's year in ($licence_file) to ($current_year)."
# Target line looks like `Copyright 2024 Thorsten Sommer`.
# Perhaps, there are whitespaces at the beginning. Using
# a regex to match the year.
let updated_license_text = $license_text | each { |it|
if $it =~ '^\s*Copyright\s+[0-9]{4}' {
$it | str replace --regex '([0-9]{4})' $"($current_year)"
} else {
$it
}
}
$updated_license_text | save --raw --force $licence_file
}
def update_app_version [action: string]: string -> bool { def update_app_version [action: string]: string -> bool {
mut meta_lines = open --raw ../../metadata.txt | lines mut meta_lines = open --raw ../../metadata.txt | lines
mut app_version = $meta_lines.0 mut app_version = $meta_lines.0

View File

@ -1 +1 @@
.mud-markdown-body code:not(.hljs){background:var(--mud-palette-overlay-dark);color:var(--mud-palette-text-primary)!important;padding:2.5px 7.5px;border-radius:5px}pre code.hljs{display:block!important;overflow-x:auto;padding:1em}.mud-markdown-body .snippet-clipboard-content{position:relative!important}.mud-markdown-body .snippet-clipboard-content:hover>.snippet-clipboard-copy-icon{display:block!important}.mud-markdown-body .snippet-clipboard-content .snippet-clipboard-copy-icon{position:absolute;display:none;top:0;right:0}.mud-markdown-body blockquote{border-left:.25em solid var(--mud-palette-text-disabled);color:var(--mud-palette-text-secondary);background-color:var(--mud-palette-drawer-background);padding:.25em 1em;margin:.5em 0 1.25em}.mud-markdown-body blockquote p{margin-bottom:0!important}.mud-markdown-body table{margin:1.25em 0}.mud-markdown-body .mud-link:hover{cursor:pointer!important}.mud-markdown-body ul{list-style-type:disc}.mud-markdown-body ol,.mud-markdown-body ul{padding-left:2em;margin-bottom:1.25em!important}.mud-markdown-body ul ul{list-style-type:circle;margin-bottom:0!important}.mud-markdown-body ul ul ul{list-style-type:square;margin-bottom:0!important}.mud-markdown-body li{display:list-item!important;text-align:-webkit-match-parent}.mud-markdown-body h1,.mud-markdown-body h2{border-bottom:1px solid var(--mud-palette-text-disabled);padding-bottom:.125em;margin-bottom:.4em}.mud-markdown-body h1,.mud-markdown-body h2,.mud-markdown-body h3,.mud-markdown-body h4,.mud-markdown-body h5,.mud-markdown-body h6{scroll-margin-top:5rem;margin-top:.25em;word-wrap:break-word;margin-bottom:.3em!important}.mud-markdown-body .mud-divider{margin:.5em 0;height:.25em}.mud-markdown-body p{margin-bottom:1.25em!important}.mud-markdown-body .mud-expand-panel p,.mud-markdown-body li p{margin-bottom:0!important}.mud-markdown-body img{max-width:100%} .mud-markdown-body code:not(.hljs){background:var(--mud-palette-chip-default);color:var(--mud-palette-text-primary)!important;padding:2.5px 7.5px;border-radius:5px}pre code.hljs{display:block!important;overflow-x:auto;padding:1em}.mud-markdown-body .snippet-clipboard-content{position:relative!important}.mud-markdown-body .snippet-clipboard-content:hover>.snippet-clipboard-copy-icon{display:block!important}.mud-markdown-body .snippet-clipboard-content .snippet-clipboard-copy-icon{position:absolute;display:none;top:0;right:0}.mud-markdown-body blockquote{border-left:.25em solid var(--mud-palette-text-disabled);color:var(--mud-palette-text-secondary);background-color:var(--mud-palette-drawer-background);padding:.25em 1em;margin:.5em 0 1.25em}.mud-markdown-body blockquote p{margin-bottom:0!important}.mud-markdown-body table{margin:1.25em 0}.mud-markdown-body .mud-link:hover{cursor:pointer!important}.mud-markdown-body ul{list-style-type:disc}.mud-markdown-body ol,.mud-markdown-body ul{padding-left:2em;margin-bottom:1.25em!important}.mud-markdown-body ul ul{list-style-type:circle;margin-bottom:0!important}.mud-markdown-body ul ul ul{list-style-type:square;margin-bottom:0!important}.mud-markdown-body li{display:list-item!important;text-align:-webkit-match-parent}.mud-markdown-body h1,.mud-markdown-body h2{border-bottom:1px solid var(--mud-palette-text-disabled);padding-bottom:.125em;margin-bottom:.4em}.mud-markdown-body h1,.mud-markdown-body h2,.mud-markdown-body h3,.mud-markdown-body h4,.mud-markdown-body h5,.mud-markdown-body h6{scroll-margin-top:5rem;margin-top:.25em;word-wrap:break-word;margin-bottom:.3em!important}.mud-markdown-body .mud-divider{margin:.5em 0;height:.25em}.mud-markdown-body p{margin-bottom:1.25em!important}.mud-markdown-body .mud-expand-panel p,.mud-markdown-body li p{margin-bottom:0!important}.mud-markdown-body img{max-width:100%}

File diff suppressed because one or more lines are too long

View File

@ -1,9 +1,9 @@
0.4.0 0.4.7
2024-05-25 18:05:54 UTC 2024-05-26 08:48:48 UTC
140 147
8.0.205 (commit 3e1383b780) 8.0.205 (commit 3e1383b780)
8.0.5 (commit 087e15321b) 8.0.5 (commit 087e15321b)
1.78.0 (commit 9b00956e5) 1.78.0 (commit 9b00956e5)
6.19.1 6.19.1
1.6.1 1.6.1
5920663365, dev debug 9b36969c8b, dev debug

2
runtime/Cargo.lock generated
View File

@ -2189,7 +2189,7 @@ checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a"
[[package]] [[package]]
name = "mindwork-ai-studio" name = "mindwork-ai-studio"
version = "0.4.0" version = "0.4.7"
dependencies = [ dependencies = [
"arboard", "arboard",
"flexi_logger", "flexi_logger",

View File

@ -1,6 +1,6 @@
[package] [package]
name = "mindwork-ai-studio" name = "mindwork-ai-studio"
version = "0.4.0" version = "0.4.7"
edition = "2021" edition = "2021"
description = "MindWork AI Studio" description = "MindWork AI Studio"
authors = ["Thorsten Sommer"] authors = ["Thorsten Sommer"]

View File

@ -6,7 +6,7 @@
}, },
"package": { "package": {
"productName": "MindWork AI Studio", "productName": "MindWork AI Studio",
"version": "0.4.0" "version": "0.4.7"
}, },
"tauri": { "tauri": {
"allowlist": { "allowlist": {