- Added comments about author in files
- added License and Notice file
This commit is contained in:
parent
a86db5adff
commit
858ac2f9d7
3
.gitignore
vendored
3
.gitignore
vendored
@ -2,4 +2,5 @@
|
|||||||
.env
|
.env
|
||||||
**/__pycache__/**
|
**/__pycache__/**
|
||||||
test.**
|
test.**
|
||||||
test_*.py
|
test_*.py
|
||||||
|
.venv
|
||||||
41
LICENSE
Normal file
41
LICENSE
Normal 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
9
src/NOTICE
Normal 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.
|
||||||
@ -1,3 +1,10 @@
|
|||||||
|
"""
|
||||||
|
:author: Quentin Leblanc
|
||||||
|
:mail: pro@quentin-leblanc.ch
|
||||||
|
:brief: Model calling for recipe analysis and enhancement
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
import json
|
import json
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
|
|||||||
14
src/utils.py
14
src/utils.py
@ -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}
|
return {"role": role, "content": content}
|
||||||
Loading…
x
Reference in New Issue
Block a user