Skip to content

Commit 3204b7e

Browse files
mkeryrxweili3zhen1egourlaoerik-apple
committed
Hello apple-fm-sdk
Co-authored-by: rxwei <rxwei@apple.com> Co-authored-by: li3zhen1 <zhenli@apple.com> Co-authored-by: egourlao <gourlaouen@apple.com> Co-authored-by: erik-apple <erik_h@apple.com>
0 parents  commit 3204b7e

95 files changed

Lines changed: 17827 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
# Python bindings for Foundation Models
2+
3+
# Byte-compiled / optimized / DLL files
4+
__pycache__/
5+
*.py[cod]
6+
*$py.class
7+
8+
# Examples and test outputs
9+
evaluation_results.json
10+
test_cases.jsonl
11+
transcript_analyses.jsonl
12+
13+
# C extensions
14+
*.so
15+
16+
# Distribution / packaging
17+
.Python
18+
build/
19+
develop-eggs/
20+
dist/
21+
downloads/
22+
eggs/
23+
.eggs/
24+
lib/
25+
lib64/
26+
parts/
27+
sdist/
28+
var/
29+
wheels/
30+
pip-wheel-metadata/
31+
share/python-wheels/
32+
*.egg-info/
33+
.installed.cfg
34+
*.egg
35+
MANIFEST
36+
37+
# PyInstaller
38+
*.manifest
39+
*.spec
40+
41+
# Installer logs
42+
pip-log.txt
43+
pip-delete-this-directory.txt
44+
45+
# Unit test / coverage reports
46+
htmlcov/
47+
.tox/
48+
.nox/
49+
.coverage
50+
.coverage.*
51+
.cache
52+
nosetests.xml
53+
coverage.xml
54+
*.cover
55+
*.py,cover
56+
.hypothesis/
57+
.pytest_cache/
58+
59+
# Translations
60+
*.mo
61+
*.pot
62+
63+
# Django stuff:
64+
*.log
65+
local_settings.py
66+
db.sqlite3
67+
db.sqlite3-journal
68+
69+
# Flask stuff:
70+
instance/
71+
.webassets-cache
72+
73+
# Scrapy stuff:
74+
.scrapy
75+
76+
# Sphinx documentation
77+
docs/_build/
78+
79+
# PyBuilder
80+
target/
81+
82+
# Jupyter Notebook
83+
.ipynb_checkpoints
84+
85+
# IPython
86+
profile_default/
87+
ipython_config.py
88+
89+
# pyenv
90+
.python-version
91+
92+
# pipenv
93+
Pipfile.lock
94+
95+
# PEP 582
96+
__pypackages__/
97+
98+
# Celery stuff
99+
celerybeat-schedule
100+
celerybeat.pid
101+
102+
# SageMath parsed files
103+
*.sage.py
104+
105+
# Environments
106+
.env
107+
.venv
108+
env/
109+
venv/
110+
ENV/
111+
env.bak/
112+
venv.bak/
113+
114+
# Spyder project settings
115+
.spyderproject
116+
.spyproject
117+
118+
# Rope project settings
119+
.ropeproject
120+
121+
# mkdocs documentation
122+
/site
123+
124+
# mypy
125+
.mypy_cache/
126+
.dmypy.json
127+
dmypy.json
128+
129+
# Pyre type checker
130+
.pyre/
131+
132+
# Generated bindings
133+
foundation_models/_c_bindings.c
134+
foundation_models/_c_bindings.*.so
135+
foundation_models/_c_bindings.o
136+
137+
# macOS
138+
.DS_Store
139+
140+
# Claude settings
141+
.claude
142+
143+
uv.lock
144+
.vscode
145+
*.profraw
146+
147+
.build
148+
149+
src/apple_fm_sdk/FoundationModelsBindings
150+
src/apple_fm_sdk/_ctypes_bindings.py

.swift-format

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{
2+
"fileScopedDeclarationPrivacy": {
3+
"accessLevel": "private"
4+
},
5+
"indentation": {
6+
"spaces": 2
7+
},
8+
"indentConditionalCompilationBlocks": false,
9+
"indentSwitchCaseLabels": false,
10+
"lineBreakAroundMultilineExpressionChainComponents": false,
11+
"lineBreakBeforeControlFlowKeywords": false,
12+
"lineBreakBeforeEachArgument": true,
13+
"lineBreakBeforeEachGenericRequirement": false,
14+
"lineLength": 100,
15+
"maximumBlankLines": 1,
16+
"multiElementCollectionTrailingCommas": false,
17+
"prioritizeKeepingFunctionOutputTogether": true,
18+
"respectsExistingLineBreaks": true,
19+
"rules": {
20+
"AmbiguousTrailingClosureOverload": true,
21+
"BeginDocumentationCommentWithOneLineSummary": false,
22+
"DoNotUseSemicolons": true,
23+
"DontRepeatTypeInStaticProperties": true,
24+
"FileScopedDeclarationPrivacy": false,
25+
"FullyIndirectEnum": true,
26+
"GroupNumericLiterals": true,
27+
"IdentifiersMustBeASCII": true,
28+
"NeverForceUnwrap": false,
29+
"NeverUseImplicitlyUnwrappedOptionals": false,
30+
"NoAccessLevelOnExtensionDeclaration": false,
31+
"NoCasesWithOnlyFallthrough": true,
32+
"NoEmptyTrailingClosureParentheses": true,
33+
"NoLabelsInCasePatterns": true,
34+
"NoLeadingUnderscores": false,
35+
"NoParensAroundConditions": true,
36+
"NoVoidReturnOnFunctionSignature": true,
37+
"OneCasePerLine": true,
38+
"OneVariableDeclarationPerLine": true,
39+
"OnlyOneTrailingClosureArgument": true,
40+
"OrderedImports": false,
41+
"ReturnVoidInsteadOfEmptyTuple": true,
42+
"UseEarlyExits": false,
43+
"UseLetInEveryBoundCaseVariable": true,
44+
"UseShorthandTypeNames": true,
45+
"UseSingleLinePropertyGetter": true,
46+
"UseTripleSlashForDocumentationComments": true,
47+
"UseWhereClausesInForLoops": false,
48+
"ValidateDocumentationComments": false
49+
},
50+
"tabWidth": 2,
51+
"version": 1
52+
}

CODE_OF_CONDUCT.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to making participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, sex characteristics, gender identity and expression,
9+
level of experience, education, socio-economic status, nationality, personal
10+
appearance, race, religion, or sexual identity and orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
* Using welcoming and inclusive language
18+
* Being respectful of differing viewpoints and experiences
19+
* Gracefully accepting constructive criticism
20+
* Focusing on what is best for the community
21+
* Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
* The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
* Trolling, insulting/derogatory comments, and personal or political attacks
28+
* Public or private harassment
29+
* Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
* Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies within all project spaces, and it also applies when
49+
an individual is representing the project or its community in public spaces.
50+
Examples of representing a project or community include using an official
51+
project e-mail address, posting via an official social media account, or acting
52+
as an appointed representative at an online or offline event. Representation of
53+
a project may be further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the open source team at [opensource-conduct@group.apple.com](mailto:opensource-conduct@group.apple.com). All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 1.4,
71+
available at [https://www.contributor-covenant.org/version/1/4/code-of-conduct.html](https://www.contributor-covenant.org/version/1/4/code-of-conduct.html)

0 commit comments

Comments
 (0)