- Added comments about author in files

- added License and Notice file
This commit is contained in:
Quentin Leblanc 2025-05-22 17:26:29 +02:00
parent a86db5adff
commit 858ac2f9d7
5 changed files with 72 additions and 2 deletions

3
.gitignore vendored
View File

@ -2,4 +2,5 @@
.env
**/__pycache__/**
test.**
test_*.py
test_*.py
.venv

41
LICENSE Normal file
View File

@ -0,0 +1,41 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions:
- "License" refers to this Apache 2.0 license with the modifications below.
- "Work" refers to the original software or content you created.
- "Attribution Notice" refers to the citation requirement in Section 5(b).
2. Redistribution and use in source and binary forms, with or without modification,
are permitted provided the following conditions are met:
a. Redistributions of source code must retain the original copyright notice,
this list of conditions, and the following disclaimer.
b. Redistributions in binary form or as part of a derivative work must reproduce
the original copyright notice, this list of conditions, and the following
disclaimer in the documentation and/or other materials provided with the
distribution.
c. All redistributions must include a clear and visible attribution to the
original author (as specified in the NOTICE file) in one or more of the
following forms:
- A mention in the documentation or "About" section of the software.
- A citation in academic or public-facing materials.
- A notice in the source code (if redistributed).
3. The NOTICE file:
- Any redistribution must include a copy of the NOTICE file from your original work.
- Derivative works may add their own notices, but they may not alter or remove
the original attribution requirements.
4. Disclaimer of Warranty:
Unless required by applicable law, the Work is provided "AS IS," without
warranties or conditions of any kind, either express or implied.
5. Limitation of Liability:
In no event shall the authors or copyright holders be liable for any claim or
damages arising from the use of the Work.

9
src/NOTICE Normal file
View File

@ -0,0 +1,9 @@
GoodRecipe
Copyright 2025 Quentin Leblanc
This product includes software developed by Quentin Leblanc (https://git.quentin-leblanc.ch/quentin/GoodRecipe).
**Attribution Requirement:**
When using, redistributing, or modifying this software, you must include a clear
citation to the original author in the form of:
"GoodRecipe by Quentin Leblanc, 2025. Available at https://git.quentin-leblanc.ch/quentin/GoodRecipe.

View File

@ -1,3 +1,10 @@
"""
:author: Quentin Leblanc
:mail: pro@quentin-leblanc.ch
:brief: Model calling for recipe analysis and enhancement
"""
import json
from typing import Any

View File

@ -1,2 +1,14 @@
def create_message(role: str, content: str):
"""
:author: Quentin Leblanc
:mail: pro@quentin-leblanc.ch
:brief: Utility functions
"""
def create_message(role: str, content: str) -> dict[str, str]:
"""
Create a message to be sent to Mistral API with role and content defined
:param role:
:param content:
:return:
"""
return {"role": role, "content": content}