Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- .gitattributes +2 -0
- vllm/lib/python3.10/site-packages/aiosignal-1.3.2.dist-info/INSTALLER +1 -0
- vllm/lib/python3.10/site-packages/aiosignal-1.3.2.dist-info/LICENSE +201 -0
- vllm/lib/python3.10/site-packages/aiosignal-1.3.2.dist-info/METADATA +123 -0
- vllm/lib/python3.10/site-packages/aiosignal-1.3.2.dist-info/RECORD +11 -0
- vllm/lib/python3.10/site-packages/aiosignal-1.3.2.dist-info/REQUESTED +0 -0
- vllm/lib/python3.10/site-packages/aiosignal-1.3.2.dist-info/WHEEL +6 -0
- vllm/lib/python3.10/site-packages/aiosignal-1.3.2.dist-info/top_level.txt +1 -0
- vllm/lib/python3.10/site-packages/hf_transfer/__pycache__/__init__.cpython-310.pyc +0 -0
- vllm/lib/python3.10/site-packages/hf_transfer/hf_transfer.abi3.so +3 -0
- vllm/lib/python3.10/site-packages/openai/types/audio/__pycache__/transcription.cpython-310.pyc +0 -0
- vllm/lib/python3.10/site-packages/openai/types/audio/__pycache__/transcription_segment.cpython-310.pyc +0 -0
- vllm/lib/python3.10/site-packages/openai/types/audio/__pycache__/transcription_word.cpython-310.pyc +0 -0
- vllm/lib/python3.10/site-packages/openai/types/audio/speech_create_params.py +41 -0
- vllm/lib/python3.10/site-packages/openai/types/beta/threads/runs/__pycache__/code_interpreter_output_image.cpython-310.pyc +0 -0
- vllm/lib/python3.10/site-packages/openai/types/beta/threads/runs/__pycache__/run_step.cpython-310.pyc +0 -0
- vllm/lib/python3.10/site-packages/openai/types/beta/threads/runs/__pycache__/step_retrieve_params.cpython-310.pyc +0 -0
- vllm/lib/python3.10/site-packages/openai/types/beta/threads/runs/code_interpreter_output_image.py +26 -0
- vllm/lib/python3.10/site-packages/openai/types/beta/threads/runs/function_tool_call.py +38 -0
- vllm/lib/python3.10/site-packages/openai/types/beta/threads/runs/function_tool_call_delta.py +41 -0
- vllm/lib/python3.10/site-packages/openai/types/beta/threads/runs/run_step_delta_event.py +19 -0
- vllm/lib/python3.10/site-packages/openai/types/beta/threads/runs/run_step_delta_message_delta.py +20 -0
- vllm/lib/python3.10/site-packages/openai/types/beta/threads/runs/step_list_params.py +56 -0
- vllm/lib/python3.10/site-packages/openai/types/beta/threads/runs/step_retrieve_params.py +28 -0
- vllm/lib/python3.10/site-packages/pycountry/COPYRIGHT.txt +46 -0
- vllm/lib/python3.10/site-packages/pycountry/__init__.py +303 -0
- vllm/lib/python3.10/site-packages/pycountry/databases/iso3166-2.json +0 -0
- vllm/lib/python3.10/site-packages/pycountry/databases/iso639-3.json +0 -0
- vllm/lib/python3.10/site-packages/pycountry/databases/iso639-5.json +464 -0
- vllm/lib/python3.10/site-packages/pycountry/db.py +200 -0
- vllm/lib/python3.10/site-packages/pycountry/locales/bn_BD/LC_MESSAGES/iso15924.mo +0 -0
- vllm/lib/python3.10/site-packages/pycountry/locales/bn_BD/LC_MESSAGES/iso3166-2.mo +0 -0
- vllm/lib/python3.10/site-packages/pycountry/locales/fy/LC_MESSAGES/iso3166-1.mo +0 -0
- vllm/lib/python3.10/site-packages/pycountry/locales/hi/LC_MESSAGES/iso3166-1.mo +0 -0
- vllm/lib/python3.10/site-packages/pycountry/locales/hi/LC_MESSAGES/iso3166-3.mo +0 -0
- vllm/lib/python3.10/site-packages/pycountry/locales/hi/LC_MESSAGES/iso639-3.mo +0 -0
- vllm/lib/python3.10/site-packages/pycountry/locales/hi/LC_MESSAGES/iso639-5.mo +0 -0
- vllm/lib/python3.10/site-packages/pycountry/locales/kl/LC_MESSAGES/iso3166-1.mo +0 -0
- vllm/lib/python3.10/site-packages/pycountry/locales/ko/LC_MESSAGES/iso3166-1.mo +0 -0
- vllm/lib/python3.10/site-packages/pycountry/locales/ko/LC_MESSAGES/iso4217.mo +0 -0
- vllm/lib/python3.10/site-packages/pycountry/locales/ko/LC_MESSAGES/iso639-3.mo +0 -0
- vllm/lib/python3.10/site-packages/pycountry/locales/ky/LC_MESSAGES/iso3166-1.mo +0 -0
- vllm/lib/python3.10/site-packages/pycountry/locales/ky/LC_MESSAGES/iso3166-2.mo +0 -0
- vllm/lib/python3.10/site-packages/pycountry/locales/pa/LC_MESSAGES/iso3166-1.mo +0 -0
- vllm/lib/python3.10/site-packages/pycountry/locales/pa/LC_MESSAGES/iso3166-3.mo +0 -0
- vllm/lib/python3.10/site-packages/pycountry/locales/ru/LC_MESSAGES/iso15924.mo +0 -0
- vllm/lib/python3.10/site-packages/pycountry/locales/ru/LC_MESSAGES/iso3166-1.mo +0 -0
- vllm/lib/python3.10/site-packages/pycountry/locales/ru/LC_MESSAGES/iso3166-2.mo +3 -0
- vllm/lib/python3.10/site-packages/pycountry/locales/ru/LC_MESSAGES/iso3166-3.mo +0 -0
- vllm/lib/python3.10/site-packages/pycountry/locales/ru/LC_MESSAGES/iso4217.mo +0 -0
.gitattributes
CHANGED
|
@@ -1590,3 +1590,5 @@ vllm/lib/python3.10/site-packages/functorch/_C.cpython-310-x86_64-linux-gnu.so f
|
|
| 1590 |
vllm/lib/libcrypto.so.3 filter=lfs diff=lfs merge=lfs -text
|
| 1591 |
vllm/lib/python3.10/site-packages/rich/__pycache__/_emoji_codes.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
|
| 1592 |
vllm/lib/python3.10/site-packages/multiprocess/tests/__pycache__/__init__.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
| 1590 |
vllm/lib/libcrypto.so.3 filter=lfs diff=lfs merge=lfs -text
|
| 1591 |
vllm/lib/python3.10/site-packages/rich/__pycache__/_emoji_codes.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
|
| 1592 |
vllm/lib/python3.10/site-packages/multiprocess/tests/__pycache__/__init__.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
|
| 1593 |
+
vllm/lib/python3.10/site-packages/pycountry/locales/ru/LC_MESSAGES/iso3166-2.mo filter=lfs diff=lfs merge=lfs -text
|
| 1594 |
+
vllm/lib/python3.10/site-packages/hf_transfer/hf_transfer.abi3.so filter=lfs diff=lfs merge=lfs -text
|
vllm/lib/python3.10/site-packages/aiosignal-1.3.2.dist-info/INSTALLER
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
pip
|
vllm/lib/python3.10/site-packages/aiosignal-1.3.2.dist-info/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Apache License
|
| 2 |
+
Version 2.0, January 2004
|
| 3 |
+
http://www.apache.org/licenses/
|
| 4 |
+
|
| 5 |
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
| 6 |
+
|
| 7 |
+
1. Definitions.
|
| 8 |
+
|
| 9 |
+
"License" shall mean the terms and conditions for use, reproduction,
|
| 10 |
+
and distribution as defined by Sections 1 through 9 of this document.
|
| 11 |
+
|
| 12 |
+
"Licensor" shall mean the copyright owner or entity authorized by
|
| 13 |
+
the copyright owner that is granting the License.
|
| 14 |
+
|
| 15 |
+
"Legal Entity" shall mean the union of the acting entity and all
|
| 16 |
+
other entities that control, are controlled by, or are under common
|
| 17 |
+
control with that entity. For the purposes of this definition,
|
| 18 |
+
"control" means (i) the power, direct or indirect, to cause the
|
| 19 |
+
direction or management of such entity, whether by contract or
|
| 20 |
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
| 21 |
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
| 22 |
+
|
| 23 |
+
"You" (or "Your") shall mean an individual or Legal Entity
|
| 24 |
+
exercising permissions granted by this License.
|
| 25 |
+
|
| 26 |
+
"Source" form shall mean the preferred form for making modifications,
|
| 27 |
+
including but not limited to software source code, documentation
|
| 28 |
+
source, and configuration files.
|
| 29 |
+
|
| 30 |
+
"Object" form shall mean any form resulting from mechanical
|
| 31 |
+
transformation or translation of a Source form, including but
|
| 32 |
+
not limited to compiled object code, generated documentation,
|
| 33 |
+
and conversions to other media types.
|
| 34 |
+
|
| 35 |
+
"Work" shall mean the work of authorship, whether in Source or
|
| 36 |
+
Object form, made available under the License, as indicated by a
|
| 37 |
+
copyright notice that is included in or attached to the work
|
| 38 |
+
(an example is provided in the Appendix below).
|
| 39 |
+
|
| 40 |
+
"Derivative Works" shall mean any work, whether in Source or Object
|
| 41 |
+
form, that is based on (or derived from) the Work and for which the
|
| 42 |
+
editorial revisions, annotations, elaborations, or other modifications
|
| 43 |
+
represent, as a whole, an original work of authorship. For the purposes
|
| 44 |
+
of this License, Derivative Works shall not include works that remain
|
| 45 |
+
separable from, or merely link (or bind by name) to the interfaces of,
|
| 46 |
+
the Work and Derivative Works thereof.
|
| 47 |
+
|
| 48 |
+
"Contribution" shall mean any work of authorship, including
|
| 49 |
+
the original version of the Work and any modifications or additions
|
| 50 |
+
to that Work or Derivative Works thereof, that is intentionally
|
| 51 |
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
| 52 |
+
or by an individual or Legal Entity authorized to submit on behalf of
|
| 53 |
+
the copyright owner. For the purposes of this definition, "submitted"
|
| 54 |
+
means any form of electronic, verbal, or written communication sent
|
| 55 |
+
to the Licensor or its representatives, including but not limited to
|
| 56 |
+
communication on electronic mailing lists, source code control systems,
|
| 57 |
+
and issue tracking systems that are managed by, or on behalf of, the
|
| 58 |
+
Licensor for the purpose of discussing and improving the Work, but
|
| 59 |
+
excluding communication that is conspicuously marked or otherwise
|
| 60 |
+
designated in writing by the copyright owner as "Not a Contribution."
|
| 61 |
+
|
| 62 |
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
| 63 |
+
on behalf of whom a Contribution has been received by Licensor and
|
| 64 |
+
subsequently incorporated within the Work.
|
| 65 |
+
|
| 66 |
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
| 67 |
+
this License, each Contributor hereby grants to You a perpetual,
|
| 68 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
| 69 |
+
copyright license to reproduce, prepare Derivative Works of,
|
| 70 |
+
publicly display, publicly perform, sublicense, and distribute the
|
| 71 |
+
Work and such Derivative Works in Source or Object form.
|
| 72 |
+
|
| 73 |
+
3. Grant of Patent License. Subject to the terms and conditions of
|
| 74 |
+
this License, each Contributor hereby grants to You a perpetual,
|
| 75 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
| 76 |
+
(except as stated in this section) patent license to make, have made,
|
| 77 |
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
| 78 |
+
where such license applies only to those patent claims licensable
|
| 79 |
+
by such Contributor that are necessarily infringed by their
|
| 80 |
+
Contribution(s) alone or by combination of their Contribution(s)
|
| 81 |
+
with the Work to which such Contribution(s) was submitted. If You
|
| 82 |
+
institute patent litigation against any entity (including a
|
| 83 |
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
| 84 |
+
or a Contribution incorporated within the Work constitutes direct
|
| 85 |
+
or contributory patent infringement, then any patent licenses
|
| 86 |
+
granted to You under this License for that Work shall terminate
|
| 87 |
+
as of the date such litigation is filed.
|
| 88 |
+
|
| 89 |
+
4. Redistribution. You may reproduce and distribute copies of the
|
| 90 |
+
Work or Derivative Works thereof in any medium, with or without
|
| 91 |
+
modifications, and in Source or Object form, provided that You
|
| 92 |
+
meet the following conditions:
|
| 93 |
+
|
| 94 |
+
(a) You must give any other recipients of the Work or
|
| 95 |
+
Derivative Works a copy of this License; and
|
| 96 |
+
|
| 97 |
+
(b) You must cause any modified files to carry prominent notices
|
| 98 |
+
stating that You changed the files; and
|
| 99 |
+
|
| 100 |
+
(c) You must retain, in the Source form of any Derivative Works
|
| 101 |
+
that You distribute, all copyright, patent, trademark, and
|
| 102 |
+
attribution notices from the Source form of the Work,
|
| 103 |
+
excluding those notices that do not pertain to any part of
|
| 104 |
+
the Derivative Works; and
|
| 105 |
+
|
| 106 |
+
(d) If the Work includes a "NOTICE" text file as part of its
|
| 107 |
+
distribution, then any Derivative Works that You distribute must
|
| 108 |
+
include a readable copy of the attribution notices contained
|
| 109 |
+
within such NOTICE file, excluding those notices that do not
|
| 110 |
+
pertain to any part of the Derivative Works, in at least one
|
| 111 |
+
of the following places: within a NOTICE text file distributed
|
| 112 |
+
as part of the Derivative Works; within the Source form or
|
| 113 |
+
documentation, if provided along with the Derivative Works; or,
|
| 114 |
+
within a display generated by the Derivative Works, if and
|
| 115 |
+
wherever such third-party notices normally appear. The contents
|
| 116 |
+
of the NOTICE file are for informational purposes only and
|
| 117 |
+
do not modify the License. You may add Your own attribution
|
| 118 |
+
notices within Derivative Works that You distribute, alongside
|
| 119 |
+
or as an addendum to the NOTICE text from the Work, provided
|
| 120 |
+
that such additional attribution notices cannot be construed
|
| 121 |
+
as modifying the License.
|
| 122 |
+
|
| 123 |
+
You may add Your own copyright statement to Your modifications and
|
| 124 |
+
may provide additional or different license terms and conditions
|
| 125 |
+
for use, reproduction, or distribution of Your modifications, or
|
| 126 |
+
for any such Derivative Works as a whole, provided Your use,
|
| 127 |
+
reproduction, and distribution of the Work otherwise complies with
|
| 128 |
+
the conditions stated in this License.
|
| 129 |
+
|
| 130 |
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
| 131 |
+
any Contribution intentionally submitted for inclusion in the Work
|
| 132 |
+
by You to the Licensor shall be under the terms and conditions of
|
| 133 |
+
this License, without any additional terms or conditions.
|
| 134 |
+
Notwithstanding the above, nothing herein shall supersede or modify
|
| 135 |
+
the terms of any separate license agreement you may have executed
|
| 136 |
+
with Licensor regarding such Contributions.
|
| 137 |
+
|
| 138 |
+
6. Trademarks. This License does not grant permission to use the trade
|
| 139 |
+
names, trademarks, service marks, or product names of the Licensor,
|
| 140 |
+
except as required for reasonable and customary use in describing the
|
| 141 |
+
origin of the Work and reproducing the content of the NOTICE file.
|
| 142 |
+
|
| 143 |
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
| 144 |
+
agreed to in writing, Licensor provides the Work (and each
|
| 145 |
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
| 146 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
| 147 |
+
implied, including, without limitation, any warranties or conditions
|
| 148 |
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
| 149 |
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
| 150 |
+
appropriateness of using or redistributing the Work and assume any
|
| 151 |
+
risks associated with Your exercise of permissions under this License.
|
| 152 |
+
|
| 153 |
+
8. Limitation of Liability. In no event and under no legal theory,
|
| 154 |
+
whether in tort (including negligence), contract, or otherwise,
|
| 155 |
+
unless required by applicable law (such as deliberate and grossly
|
| 156 |
+
negligent acts) or agreed to in writing, shall any Contributor be
|
| 157 |
+
liable to You for damages, including any direct, indirect, special,
|
| 158 |
+
incidental, or consequential damages of any character arising as a
|
| 159 |
+
result of this License or out of the use or inability to use the
|
| 160 |
+
Work (including but not limited to damages for loss of goodwill,
|
| 161 |
+
work stoppage, computer failure or malfunction, or any and all
|
| 162 |
+
other commercial damages or losses), even if such Contributor
|
| 163 |
+
has been advised of the possibility of such damages.
|
| 164 |
+
|
| 165 |
+
9. Accepting Warranty or Additional Liability. While redistributing
|
| 166 |
+
the Work or Derivative Works thereof, You may choose to offer,
|
| 167 |
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
| 168 |
+
or other liability obligations and/or rights consistent with this
|
| 169 |
+
License. However, in accepting such obligations, You may act only
|
| 170 |
+
on Your own behalf and on Your sole responsibility, not on behalf
|
| 171 |
+
of any other Contributor, and only if You agree to indemnify,
|
| 172 |
+
defend, and hold each Contributor harmless for any liability
|
| 173 |
+
incurred by, or claims asserted against, such Contributor by reason
|
| 174 |
+
of your accepting any such warranty or additional liability.
|
| 175 |
+
|
| 176 |
+
END OF TERMS AND CONDITIONS
|
| 177 |
+
|
| 178 |
+
APPENDIX: How to apply the Apache License to your work.
|
| 179 |
+
|
| 180 |
+
To apply the Apache License to your work, attach the following
|
| 181 |
+
boilerplate notice, with the fields enclosed by brackets "{}"
|
| 182 |
+
replaced with your own identifying information. (Don't include
|
| 183 |
+
the brackets!) The text should be enclosed in the appropriate
|
| 184 |
+
comment syntax for the file format. We also recommend that a
|
| 185 |
+
file or class name and description of purpose be included on the
|
| 186 |
+
same "printed page" as the copyright notice for easier
|
| 187 |
+
identification within third-party archives.
|
| 188 |
+
|
| 189 |
+
Copyright 2013-2019 Nikolay Kim and Andrew Svetlov
|
| 190 |
+
|
| 191 |
+
Licensed under the Apache License, Version 2.0 (the "License");
|
| 192 |
+
you may not use this file except in compliance with the License.
|
| 193 |
+
You may obtain a copy of the License at
|
| 194 |
+
|
| 195 |
+
http://www.apache.org/licenses/LICENSE-2.0
|
| 196 |
+
|
| 197 |
+
Unless required by applicable law or agreed to in writing, software
|
| 198 |
+
distributed under the License is distributed on an "AS IS" BASIS,
|
| 199 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 200 |
+
See the License for the specific language governing permissions and
|
| 201 |
+
limitations under the License.
|
vllm/lib/python3.10/site-packages/aiosignal-1.3.2.dist-info/METADATA
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Metadata-Version: 2.1
|
| 2 |
+
Name: aiosignal
|
| 3 |
+
Version: 1.3.2
|
| 4 |
+
Summary: aiosignal: a list of registered asynchronous callbacks
|
| 5 |
+
Home-page: https://github.com/aio-libs/aiosignal
|
| 6 |
+
Maintainer: aiohttp team <team@aiohttp.org>
|
| 7 |
+
Maintainer-email: team@aiohttp.org
|
| 8 |
+
License: Apache 2.0
|
| 9 |
+
Project-URL: Chat: Gitter, https://gitter.im/aio-libs/Lobby
|
| 10 |
+
Project-URL: CI: GitHub Actions, https://github.com/aio-libs/aiosignal/actions
|
| 11 |
+
Project-URL: Coverage: codecov, https://codecov.io/github/aio-libs/aiosignal
|
| 12 |
+
Project-URL: Docs: RTD, https://docs.aiosignal.org
|
| 13 |
+
Project-URL: GitHub: issues, https://github.com/aio-libs/aiosignal/issues
|
| 14 |
+
Project-URL: GitHub: repo, https://github.com/aio-libs/aiosignal
|
| 15 |
+
Classifier: License :: OSI Approved :: Apache Software License
|
| 16 |
+
Classifier: Intended Audience :: Developers
|
| 17 |
+
Classifier: Programming Language :: Python
|
| 18 |
+
Classifier: Programming Language :: Python :: 3
|
| 19 |
+
Classifier: Programming Language :: Python :: 3 :: Only
|
| 20 |
+
Classifier: Development Status :: 5 - Production/Stable
|
| 21 |
+
Classifier: Operating System :: POSIX
|
| 22 |
+
Classifier: Operating System :: MacOS :: MacOS X
|
| 23 |
+
Classifier: Operating System :: Microsoft :: Windows
|
| 24 |
+
Classifier: Framework :: AsyncIO
|
| 25 |
+
Requires-Python: >=3.9
|
| 26 |
+
Description-Content-Type: text/x-rst
|
| 27 |
+
License-File: LICENSE
|
| 28 |
+
Requires-Dist: frozenlist>=1.1.0
|
| 29 |
+
|
| 30 |
+
=========
|
| 31 |
+
aiosignal
|
| 32 |
+
=========
|
| 33 |
+
|
| 34 |
+
.. image:: https://github.com/aio-libs/aiosignal/workflows/CI/badge.svg
|
| 35 |
+
:target: https://github.com/aio-libs/aiosignal/actions?query=workflow%3ACI
|
| 36 |
+
:alt: GitHub status for master branch
|
| 37 |
+
|
| 38 |
+
.. image:: https://codecov.io/gh/aio-libs/aiosignal/branch/master/graph/badge.svg
|
| 39 |
+
:target: https://codecov.io/gh/aio-libs/aiosignal
|
| 40 |
+
:alt: codecov.io status for master branch
|
| 41 |
+
|
| 42 |
+
.. image:: https://badge.fury.io/py/aiosignal.svg
|
| 43 |
+
:target: https://pypi.org/project/aiosignal
|
| 44 |
+
:alt: Latest PyPI package version
|
| 45 |
+
|
| 46 |
+
.. image:: https://readthedocs.org/projects/aiosignal/badge/?version=latest
|
| 47 |
+
:target: https://aiosignal.readthedocs.io/
|
| 48 |
+
:alt: Latest Read The Docs
|
| 49 |
+
|
| 50 |
+
.. image:: https://img.shields.io/discourse/topics?server=https%3A%2F%2Faio-libs.discourse.group%2F
|
| 51 |
+
:target: https://aio-libs.discourse.group/
|
| 52 |
+
:alt: Discourse group for io-libs
|
| 53 |
+
|
| 54 |
+
.. image:: https://badges.gitter.im/Join%20Chat.svg
|
| 55 |
+
:target: https://gitter.im/aio-libs/Lobby
|
| 56 |
+
:alt: Chat on Gitter
|
| 57 |
+
|
| 58 |
+
Introduction
|
| 59 |
+
============
|
| 60 |
+
|
| 61 |
+
A project to manage callbacks in `asyncio` projects.
|
| 62 |
+
|
| 63 |
+
``Signal`` is a list of registered asynchronous callbacks.
|
| 64 |
+
|
| 65 |
+
The signal's life-cycle has two stages: after creation its content
|
| 66 |
+
could be filled by using standard list operations: ``sig.append()``
|
| 67 |
+
etc.
|
| 68 |
+
|
| 69 |
+
After you call ``sig.freeze()`` the signal is *frozen*: adding, removing
|
| 70 |
+
and dropping callbacks is forbidden.
|
| 71 |
+
|
| 72 |
+
The only available operation is calling the previously registered
|
| 73 |
+
callbacks by using ``await sig.send(data)``.
|
| 74 |
+
|
| 75 |
+
For concrete usage examples see the `Signals
|
| 76 |
+
<https://docs.aiohttp.org/en/stable/web_advanced.html#aiohttp-web-signals>
|
| 77 |
+
section of the `Web Server Advanced
|
| 78 |
+
<https://docs.aiohttp.org/en/stable/web_advanced.html>` chapter of the `aiohttp
|
| 79 |
+
documentation`_.
|
| 80 |
+
|
| 81 |
+
|
| 82 |
+
Installation
|
| 83 |
+
------------
|
| 84 |
+
|
| 85 |
+
::
|
| 86 |
+
|
| 87 |
+
$ pip install aiosignal
|
| 88 |
+
|
| 89 |
+
The library requires Python 3.8 or newer.
|
| 90 |
+
|
| 91 |
+
|
| 92 |
+
Documentation
|
| 93 |
+
=============
|
| 94 |
+
|
| 95 |
+
https://aiosignal.readthedocs.io/
|
| 96 |
+
|
| 97 |
+
Communication channels
|
| 98 |
+
======================
|
| 99 |
+
|
| 100 |
+
*gitter chat* https://gitter.im/aio-libs/Lobby
|
| 101 |
+
|
| 102 |
+
Requirements
|
| 103 |
+
============
|
| 104 |
+
|
| 105 |
+
- Python >= 3.8
|
| 106 |
+
- frozenlist >= 1.0.0
|
| 107 |
+
|
| 108 |
+
License
|
| 109 |
+
=======
|
| 110 |
+
|
| 111 |
+
``aiosignal`` is offered under the Apache 2 license.
|
| 112 |
+
|
| 113 |
+
Source code
|
| 114 |
+
===========
|
| 115 |
+
|
| 116 |
+
The project is hosted on GitHub_
|
| 117 |
+
|
| 118 |
+
Please file an issue in the `bug tracker
|
| 119 |
+
<https://github.com/aio-libs/aiosignal/issues>`_ if you have found a bug
|
| 120 |
+
or have some suggestions to improve the library.
|
| 121 |
+
|
| 122 |
+
.. _GitHub: https://github.com/aio-libs/aiosignal
|
| 123 |
+
.. _aiohttp documentation: https://docs.aiohttp.org/
|
vllm/lib/python3.10/site-packages/aiosignal-1.3.2.dist-info/RECORD
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
aiosignal-1.3.2.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
|
| 2 |
+
aiosignal-1.3.2.dist-info/LICENSE,sha256=b9UkPpLdf5jsacesN3co50kFcJ_1J6W_mNbQJjwE9bY,11332
|
| 3 |
+
aiosignal-1.3.2.dist-info/METADATA,sha256=TeI_xgZ191qgx37rviEnpMWC0QnYsg_j9EGVivNqqjc,3753
|
| 4 |
+
aiosignal-1.3.2.dist-info/RECORD,,
|
| 5 |
+
aiosignal-1.3.2.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
| 6 |
+
aiosignal-1.3.2.dist-info/WHEEL,sha256=pxeNX5JdtCe58PUSYP9upmc7jdRPgvT0Gm9kb1SHlVw,109
|
| 7 |
+
aiosignal-1.3.2.dist-info/top_level.txt,sha256=z45aNOKGDdrI1roqZY3BGXQ22kJFPHBmVdwtLYLtXC0,10
|
| 8 |
+
aiosignal/__init__.py,sha256=1oIrRl6kNpqFh32e7HfMFbMV_35v8sqJJFfnuKgmtEU,867
|
| 9 |
+
aiosignal/__init__.pyi,sha256=xeCddYSS8fZAkz8S4HuKSR2IDe3N7RW_LKcXDPPA1Xk,311
|
| 10 |
+
aiosignal/__pycache__/__init__.cpython-310.pyc,,
|
| 11 |
+
aiosignal/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
vllm/lib/python3.10/site-packages/aiosignal-1.3.2.dist-info/REQUESTED
ADDED
|
File without changes
|
vllm/lib/python3.10/site-packages/aiosignal-1.3.2.dist-info/WHEEL
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Wheel-Version: 1.0
|
| 2 |
+
Generator: setuptools (75.6.0)
|
| 3 |
+
Root-Is-Purelib: true
|
| 4 |
+
Tag: py2-none-any
|
| 5 |
+
Tag: py3-none-any
|
| 6 |
+
|
vllm/lib/python3.10/site-packages/aiosignal-1.3.2.dist-info/top_level.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
aiosignal
|
vllm/lib/python3.10/site-packages/hf_transfer/__pycache__/__init__.cpython-310.pyc
ADDED
|
Binary file (255 Bytes). View file
|
|
|
vllm/lib/python3.10/site-packages/hf_transfer/hf_transfer.abi3.so
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6501861b3c9eaa2bcaa37fa420a61043b9bec16d1620b4475fc016f90df1d5b5
|
| 3 |
+
size 9653960
|
vllm/lib/python3.10/site-packages/openai/types/audio/__pycache__/transcription.cpython-310.pyc
ADDED
|
Binary file (435 Bytes). View file
|
|
|
vllm/lib/python3.10/site-packages/openai/types/audio/__pycache__/transcription_segment.cpython-310.pyc
ADDED
|
Binary file (728 Bytes). View file
|
|
|
vllm/lib/python3.10/site-packages/openai/types/audio/__pycache__/transcription_word.cpython-310.pyc
ADDED
|
Binary file (491 Bytes). View file
|
|
|
vllm/lib/python3.10/site-packages/openai/types/audio/speech_create_params.py
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
|
| 3 |
+
from __future__ import annotations
|
| 4 |
+
|
| 5 |
+
from typing import Union
|
| 6 |
+
from typing_extensions import Literal, Required, TypedDict
|
| 7 |
+
|
| 8 |
+
from .speech_model import SpeechModel
|
| 9 |
+
|
| 10 |
+
__all__ = ["SpeechCreateParams"]
|
| 11 |
+
|
| 12 |
+
|
| 13 |
+
class SpeechCreateParams(TypedDict, total=False):
|
| 14 |
+
input: Required[str]
|
| 15 |
+
"""The text to generate audio for. The maximum length is 4096 characters."""
|
| 16 |
+
|
| 17 |
+
model: Required[Union[str, SpeechModel]]
|
| 18 |
+
"""
|
| 19 |
+
One of the available [TTS models](https://platform.openai.com/docs/models#tts):
|
| 20 |
+
`tts-1` or `tts-1-hd`
|
| 21 |
+
"""
|
| 22 |
+
|
| 23 |
+
voice: Required[Literal["alloy", "echo", "fable", "onyx", "nova", "shimmer"]]
|
| 24 |
+
"""The voice to use when generating the audio.
|
| 25 |
+
|
| 26 |
+
Supported voices are `alloy`, `echo`, `fable`, `onyx`, `nova`, and `shimmer`.
|
| 27 |
+
Previews of the voices are available in the
|
| 28 |
+
[Text to speech guide](https://platform.openai.com/docs/guides/text-to-speech#voice-options).
|
| 29 |
+
"""
|
| 30 |
+
|
| 31 |
+
response_format: Literal["mp3", "opus", "aac", "flac", "wav", "pcm"]
|
| 32 |
+
"""The format to audio in.
|
| 33 |
+
|
| 34 |
+
Supported formats are `mp3`, `opus`, `aac`, `flac`, `wav`, and `pcm`.
|
| 35 |
+
"""
|
| 36 |
+
|
| 37 |
+
speed: float
|
| 38 |
+
"""The speed of the generated audio.
|
| 39 |
+
|
| 40 |
+
Select a value from `0.25` to `4.0`. `1.0` is the default.
|
| 41 |
+
"""
|
vllm/lib/python3.10/site-packages/openai/types/beta/threads/runs/__pycache__/code_interpreter_output_image.cpython-310.pyc
ADDED
|
Binary file (827 Bytes). View file
|
|
|
vllm/lib/python3.10/site-packages/openai/types/beta/threads/runs/__pycache__/run_step.cpython-310.pyc
ADDED
|
Binary file (1.97 kB). View file
|
|
|
vllm/lib/python3.10/site-packages/openai/types/beta/threads/runs/__pycache__/step_retrieve_params.cpython-310.pyc
ADDED
|
Binary file (717 Bytes). View file
|
|
|
vllm/lib/python3.10/site-packages/openai/types/beta/threads/runs/code_interpreter_output_image.py
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
|
| 3 |
+
from typing import Optional
|
| 4 |
+
from typing_extensions import Literal
|
| 5 |
+
|
| 6 |
+
from ....._models import BaseModel
|
| 7 |
+
|
| 8 |
+
__all__ = ["CodeInterpreterOutputImage", "Image"]
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
class Image(BaseModel):
|
| 12 |
+
file_id: Optional[str] = None
|
| 13 |
+
"""
|
| 14 |
+
The [file](https://platform.openai.com/docs/api-reference/files) ID of the
|
| 15 |
+
image.
|
| 16 |
+
"""
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
class CodeInterpreterOutputImage(BaseModel):
|
| 20 |
+
index: int
|
| 21 |
+
"""The index of the output in the outputs array."""
|
| 22 |
+
|
| 23 |
+
type: Literal["image"]
|
| 24 |
+
"""Always `image`."""
|
| 25 |
+
|
| 26 |
+
image: Optional[Image] = None
|
vllm/lib/python3.10/site-packages/openai/types/beta/threads/runs/function_tool_call.py
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
|
| 3 |
+
from typing import Optional
|
| 4 |
+
from typing_extensions import Literal
|
| 5 |
+
|
| 6 |
+
from ....._models import BaseModel
|
| 7 |
+
|
| 8 |
+
__all__ = ["FunctionToolCall", "Function"]
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
class Function(BaseModel):
|
| 12 |
+
arguments: str
|
| 13 |
+
"""The arguments passed to the function."""
|
| 14 |
+
|
| 15 |
+
name: str
|
| 16 |
+
"""The name of the function."""
|
| 17 |
+
|
| 18 |
+
output: Optional[str] = None
|
| 19 |
+
"""The output of the function.
|
| 20 |
+
|
| 21 |
+
This will be `null` if the outputs have not been
|
| 22 |
+
[submitted](https://platform.openai.com/docs/api-reference/runs/submitToolOutputs)
|
| 23 |
+
yet.
|
| 24 |
+
"""
|
| 25 |
+
|
| 26 |
+
|
| 27 |
+
class FunctionToolCall(BaseModel):
|
| 28 |
+
id: str
|
| 29 |
+
"""The ID of the tool call object."""
|
| 30 |
+
|
| 31 |
+
function: Function
|
| 32 |
+
"""The definition of the function that was called."""
|
| 33 |
+
|
| 34 |
+
type: Literal["function"]
|
| 35 |
+
"""The type of tool call.
|
| 36 |
+
|
| 37 |
+
This is always going to be `function` for this type of tool call.
|
| 38 |
+
"""
|
vllm/lib/python3.10/site-packages/openai/types/beta/threads/runs/function_tool_call_delta.py
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
|
| 3 |
+
from typing import Optional
|
| 4 |
+
from typing_extensions import Literal
|
| 5 |
+
|
| 6 |
+
from ....._models import BaseModel
|
| 7 |
+
|
| 8 |
+
__all__ = ["FunctionToolCallDelta", "Function"]
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
class Function(BaseModel):
|
| 12 |
+
arguments: Optional[str] = None
|
| 13 |
+
"""The arguments passed to the function."""
|
| 14 |
+
|
| 15 |
+
name: Optional[str] = None
|
| 16 |
+
"""The name of the function."""
|
| 17 |
+
|
| 18 |
+
output: Optional[str] = None
|
| 19 |
+
"""The output of the function.
|
| 20 |
+
|
| 21 |
+
This will be `null` if the outputs have not been
|
| 22 |
+
[submitted](https://platform.openai.com/docs/api-reference/runs/submitToolOutputs)
|
| 23 |
+
yet.
|
| 24 |
+
"""
|
| 25 |
+
|
| 26 |
+
|
| 27 |
+
class FunctionToolCallDelta(BaseModel):
|
| 28 |
+
index: int
|
| 29 |
+
"""The index of the tool call in the tool calls array."""
|
| 30 |
+
|
| 31 |
+
type: Literal["function"]
|
| 32 |
+
"""The type of tool call.
|
| 33 |
+
|
| 34 |
+
This is always going to be `function` for this type of tool call.
|
| 35 |
+
"""
|
| 36 |
+
|
| 37 |
+
id: Optional[str] = None
|
| 38 |
+
"""The ID of the tool call object."""
|
| 39 |
+
|
| 40 |
+
function: Optional[Function] = None
|
| 41 |
+
"""The definition of the function that was called."""
|
vllm/lib/python3.10/site-packages/openai/types/beta/threads/runs/run_step_delta_event.py
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
|
| 3 |
+
from typing_extensions import Literal
|
| 4 |
+
|
| 5 |
+
from ....._models import BaseModel
|
| 6 |
+
from .run_step_delta import RunStepDelta
|
| 7 |
+
|
| 8 |
+
__all__ = ["RunStepDeltaEvent"]
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
class RunStepDeltaEvent(BaseModel):
|
| 12 |
+
id: str
|
| 13 |
+
"""The identifier of the run step, which can be referenced in API endpoints."""
|
| 14 |
+
|
| 15 |
+
delta: RunStepDelta
|
| 16 |
+
"""The delta containing the fields that have changed on the run step."""
|
| 17 |
+
|
| 18 |
+
object: Literal["thread.run.step.delta"]
|
| 19 |
+
"""The object type, which is always `thread.run.step.delta`."""
|
vllm/lib/python3.10/site-packages/openai/types/beta/threads/runs/run_step_delta_message_delta.py
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
|
| 3 |
+
from typing import Optional
|
| 4 |
+
from typing_extensions import Literal
|
| 5 |
+
|
| 6 |
+
from ....._models import BaseModel
|
| 7 |
+
|
| 8 |
+
__all__ = ["RunStepDeltaMessageDelta", "MessageCreation"]
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
class MessageCreation(BaseModel):
|
| 12 |
+
message_id: Optional[str] = None
|
| 13 |
+
"""The ID of the message that was created by this run step."""
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
class RunStepDeltaMessageDelta(BaseModel):
|
| 17 |
+
type: Literal["message_creation"]
|
| 18 |
+
"""Always `message_creation`."""
|
| 19 |
+
|
| 20 |
+
message_creation: Optional[MessageCreation] = None
|
vllm/lib/python3.10/site-packages/openai/types/beta/threads/runs/step_list_params.py
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
|
| 3 |
+
from __future__ import annotations
|
| 4 |
+
|
| 5 |
+
from typing import List
|
| 6 |
+
from typing_extensions import Literal, Required, TypedDict
|
| 7 |
+
|
| 8 |
+
from .run_step_include import RunStepInclude
|
| 9 |
+
|
| 10 |
+
__all__ = ["StepListParams"]
|
| 11 |
+
|
| 12 |
+
|
| 13 |
+
class StepListParams(TypedDict, total=False):
|
| 14 |
+
thread_id: Required[str]
|
| 15 |
+
|
| 16 |
+
after: str
|
| 17 |
+
"""A cursor for use in pagination.
|
| 18 |
+
|
| 19 |
+
`after` is an object ID that defines your place in the list. For instance, if
|
| 20 |
+
you make a list request and receive 100 objects, ending with obj_foo, your
|
| 21 |
+
subsequent call can include after=obj_foo in order to fetch the next page of the
|
| 22 |
+
list.
|
| 23 |
+
"""
|
| 24 |
+
|
| 25 |
+
before: str
|
| 26 |
+
"""A cursor for use in pagination.
|
| 27 |
+
|
| 28 |
+
`before` is an object ID that defines your place in the list. For instance, if
|
| 29 |
+
you make a list request and receive 100 objects, starting with obj_foo, your
|
| 30 |
+
subsequent call can include before=obj_foo in order to fetch the previous page
|
| 31 |
+
of the list.
|
| 32 |
+
"""
|
| 33 |
+
|
| 34 |
+
include: List[RunStepInclude]
|
| 35 |
+
"""A list of additional fields to include in the response.
|
| 36 |
+
|
| 37 |
+
Currently the only supported value is
|
| 38 |
+
`step_details.tool_calls[*].file_search.results[*].content` to fetch the file
|
| 39 |
+
search result content.
|
| 40 |
+
|
| 41 |
+
See the
|
| 42 |
+
[file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings)
|
| 43 |
+
for more information.
|
| 44 |
+
"""
|
| 45 |
+
|
| 46 |
+
limit: int
|
| 47 |
+
"""A limit on the number of objects to be returned.
|
| 48 |
+
|
| 49 |
+
Limit can range between 1 and 100, and the default is 20.
|
| 50 |
+
"""
|
| 51 |
+
|
| 52 |
+
order: Literal["asc", "desc"]
|
| 53 |
+
"""Sort order by the `created_at` timestamp of the objects.
|
| 54 |
+
|
| 55 |
+
`asc` for ascending order and `desc` for descending order.
|
| 56 |
+
"""
|
vllm/lib/python3.10/site-packages/openai/types/beta/threads/runs/step_retrieve_params.py
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
|
| 3 |
+
from __future__ import annotations
|
| 4 |
+
|
| 5 |
+
from typing import List
|
| 6 |
+
from typing_extensions import Required, TypedDict
|
| 7 |
+
|
| 8 |
+
from .run_step_include import RunStepInclude
|
| 9 |
+
|
| 10 |
+
__all__ = ["StepRetrieveParams"]
|
| 11 |
+
|
| 12 |
+
|
| 13 |
+
class StepRetrieveParams(TypedDict, total=False):
|
| 14 |
+
thread_id: Required[str]
|
| 15 |
+
|
| 16 |
+
run_id: Required[str]
|
| 17 |
+
|
| 18 |
+
include: List[RunStepInclude]
|
| 19 |
+
"""A list of additional fields to include in the response.
|
| 20 |
+
|
| 21 |
+
Currently the only supported value is
|
| 22 |
+
`step_details.tool_calls[*].file_search.results[*].content` to fetch the file
|
| 23 |
+
search result content.
|
| 24 |
+
|
| 25 |
+
See the
|
| 26 |
+
[file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings)
|
| 27 |
+
for more information.
|
| 28 |
+
"""
|
vllm/lib/python3.10/site-packages/pycountry/COPYRIGHT.txt
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
COPYRIGHT (c) 2008 - 2023, pycountry
|
| 2 |
+
|
| 3 |
+
Pycountry is free software; you can redistribute it and/or modify
|
| 4 |
+
it under the terms of the GNU Lesser General Public License as published by
|
| 5 |
+
the Free Software Foundation; either version 2.1 of the License, or any later version.
|
| 6 |
+
|
| 7 |
+
This project is distributed in the hope that it will be useful,
|
| 8 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 9 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 10 |
+
GNU Lesser General Public License for more details.
|
| 11 |
+
|
| 12 |
+
Contributors:
|
| 13 |
+
- Christian Theune (2008-2020, 2022)
|
| 14 |
+
- Nate Schimmoller (2022-2023)
|
| 15 |
+
- Zachary Ware (2016, 2023)
|
| 16 |
+
- Alan Orth (2023)
|
| 17 |
+
- Ashok Argent-Katwala (2020)
|
| 18 |
+
- Bastien Vallet (2020)
|
| 19 |
+
- Chris R Bunney 2020
|
| 20 |
+
- Christian Zagrodnick (2012-2013)
|
| 21 |
+
- Christoph Zwerschke (2013)
|
| 22 |
+
- Jakub Wilk (2020)
|
| 23 |
+
- Janis Kirsteins (2019)
|
| 24 |
+
- Justin Ryan Wagner 2014
|
| 25 |
+
- Kevin Deldycke (2014, 2016)
|
| 26 |
+
- Louis Sautier (2020)
|
| 27 |
+
- Lucas Wiman (2015)
|
| 28 |
+
- Mario Vilas (2014)
|
| 29 |
+
- Michael Howitz (2020)
|
| 30 |
+
- Michał Bielawski (2021, 2023)
|
| 31 |
+
- Michał Górny (2020)
|
| 32 |
+
- Mike Taves (2023)
|
| 33 |
+
- Pedro Ferreira (2013)
|
| 34 |
+
- Stuart Prescott (2021)
|
| 35 |
+
- Victor Mireyev (2016)
|
| 36 |
+
- simon klemenc (2016)
|
| 37 |
+
|
| 38 |
+
Additional Acknowledgements and Licensing Information:
|
| 39 |
+
- Data in the /src/databases/ and /src/locales/ folders is sourced from the Debian iso-codes project, available at: https://salsa.debian.org/iso-codes-team/iso-codes. This data is used under the terms of the GNU Lesser General Public License Version 2.1 (February 1999).
|
| 40 |
+
|
| 41 |
+
The Debian iso-codes project is a collection of code lists for different standards, maintained and made available under the GNU Lesser General Public License Version 2.1. We gratefully acknowledge the Debian iso-codes team and contributors for their work and for making this resource freely available.
|
| 42 |
+
|
| 43 |
+
The full text of the GNU Lesser General Public License Version 2.1 can be found at: https://salsa.debian.org/iso-codes-team/iso-codes/-/blob/main/COPYING.
|
| 44 |
+
|
| 45 |
+
For the full text of the GNU Lesser General Public License,
|
| 46 |
+
see https://github.com/pycountry/pycountry/blob/main/LICENSE.txt.
|
vllm/lib/python3.10/site-packages/pycountry/__init__.py
ADDED
|
@@ -0,0 +1,303 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""pycountry"""
|
| 2 |
+
|
| 3 |
+
import os.path
|
| 4 |
+
import unicodedata
|
| 5 |
+
from importlib import metadata as _importlib_metadata
|
| 6 |
+
from typing import Dict, List, Optional, Type
|
| 7 |
+
|
| 8 |
+
import pycountry.db
|
| 9 |
+
|
| 10 |
+
# We prioritise importing the backported `importlib_resources`
|
| 11 |
+
# because the function we use (`importlib.resources.files`) is only
|
| 12 |
+
# available from Python 3.9, but the module itself exists since 3.7.
|
| 13 |
+
# We install `importlib_resources` on Python < 3.9.
|
| 14 |
+
# TODO: Remove usage of importlib_resources once support for Python 3.8 is dropped
|
| 15 |
+
try:
|
| 16 |
+
import importlib_resources # type: ignore
|
| 17 |
+
except ModuleNotFoundError:
|
| 18 |
+
from importlib import resources as importlib_resources # type: ignore
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
def resource_filename(package_or_requirement: str, resource_name: str) -> str:
|
| 22 |
+
return str(
|
| 23 |
+
importlib_resources.files(package_or_requirement) / resource_name
|
| 24 |
+
)
|
| 25 |
+
|
| 26 |
+
|
| 27 |
+
def get_version(distribution_name: str) -> Optional[str]:
|
| 28 |
+
try:
|
| 29 |
+
return _importlib_metadata.version(distribution_name)
|
| 30 |
+
except _importlib_metadata.PackageNotFoundError:
|
| 31 |
+
return "n/a"
|
| 32 |
+
|
| 33 |
+
|
| 34 |
+
# Variable annotations
|
| 35 |
+
LOCALES_DIR: str = resource_filename("pycountry", "locales")
|
| 36 |
+
DATABASE_DIR: str = resource_filename("pycountry", "databases")
|
| 37 |
+
__version__: Optional[str] = get_version("pycountry")
|
| 38 |
+
|
| 39 |
+
|
| 40 |
+
def remove_accents(input_str: str) -> str:
|
| 41 |
+
output_str = input_str
|
| 42 |
+
if not input_str.isascii():
|
| 43 |
+
# Borrowed from https://stackoverflow.com/a/517974/1509718
|
| 44 |
+
nfkd_form = unicodedata.normalize("NFKD", input_str)
|
| 45 |
+
output_str = "".join(
|
| 46 |
+
[c for c in nfkd_form if not unicodedata.combining(c)]
|
| 47 |
+
)
|
| 48 |
+
return output_str
|
| 49 |
+
|
| 50 |
+
|
| 51 |
+
class ExistingCountries(pycountry.db.Database):
|
| 52 |
+
"""Provides access to an ISO 3166 database (Countries)."""
|
| 53 |
+
|
| 54 |
+
data_class = pycountry.db.Country
|
| 55 |
+
root_key = "3166-1"
|
| 56 |
+
|
| 57 |
+
def search_fuzzy(self, query: str) -> List[Type["ExistingCountries"]]:
|
| 58 |
+
query = remove_accents(query.strip().lower())
|
| 59 |
+
|
| 60 |
+
# A country-code to points mapping for later sorting countries
|
| 61 |
+
# based on the query's matching incidence.
|
| 62 |
+
results: dict[str, int] = {}
|
| 63 |
+
|
| 64 |
+
def add_result(country: "pycountry.db.Country", points: int) -> None:
|
| 65 |
+
results.setdefault(country.alpha_2, 0)
|
| 66 |
+
results[country.alpha_2] += points
|
| 67 |
+
|
| 68 |
+
# Prio 1: exact matches on country names
|
| 69 |
+
try:
|
| 70 |
+
add_result(self.lookup(query), 50)
|
| 71 |
+
except LookupError:
|
| 72 |
+
pass
|
| 73 |
+
|
| 74 |
+
# Prio 2: exact matches on subdivision names
|
| 75 |
+
match_subdivions = pycountry.Subdivisions.match(
|
| 76 |
+
self=subdivisions, query=query
|
| 77 |
+
)
|
| 78 |
+
for candidate in match_subdivions:
|
| 79 |
+
add_result(candidate.country, 49)
|
| 80 |
+
|
| 81 |
+
# Prio 3: partial matches on country names
|
| 82 |
+
for candidate in self:
|
| 83 |
+
# Higher priority for a match on the common name
|
| 84 |
+
for v in [
|
| 85 |
+
candidate._fields.get("name"),
|
| 86 |
+
candidate._fields.get("official_name"),
|
| 87 |
+
candidate._fields.get("comment"),
|
| 88 |
+
]:
|
| 89 |
+
if v is not None:
|
| 90 |
+
v = remove_accents(v.lower())
|
| 91 |
+
if query in v:
|
| 92 |
+
# This prefers countries with a match early in their name
|
| 93 |
+
# and also balances against countries with a number of
|
| 94 |
+
# partial matches and their name containing 'new' in the
|
| 95 |
+
# middle
|
| 96 |
+
add_result(
|
| 97 |
+
candidate, max([5, 30 - (2 * v.find(query))])
|
| 98 |
+
)
|
| 99 |
+
break
|
| 100 |
+
|
| 101 |
+
# Prio 4: partial matches on subdivision names
|
| 102 |
+
partial_match_subdivisions = pycountry.Subdivisions.partial_match(
|
| 103 |
+
self=subdivisions, query=query
|
| 104 |
+
)
|
| 105 |
+
for candidate in partial_match_subdivisions:
|
| 106 |
+
v = candidate._fields.get("name")
|
| 107 |
+
v = remove_accents(v.lower())
|
| 108 |
+
if query in v:
|
| 109 |
+
add_result(candidate.country, max([1, 5 - v.find(query)]))
|
| 110 |
+
|
| 111 |
+
if not results:
|
| 112 |
+
raise LookupError(query)
|
| 113 |
+
|
| 114 |
+
sorted_results = [
|
| 115 |
+
self.get(alpha_2=x[0])
|
| 116 |
+
# sort by points first, by alpha2 code second, and to ensure stable
|
| 117 |
+
# results the negative value allows us to sort reversely on the
|
| 118 |
+
# points but ascending on the country code.
|
| 119 |
+
for x in sorted(results.items(), key=lambda x: (-x[1], x[0]))
|
| 120 |
+
]
|
| 121 |
+
return sorted_results
|
| 122 |
+
|
| 123 |
+
|
| 124 |
+
class HistoricCountries(ExistingCountries):
|
| 125 |
+
"""Provides access to an ISO 3166-3 database
|
| 126 |
+
(Countries that have been removed from the standard)."""
|
| 127 |
+
|
| 128 |
+
data_class = pycountry.db.Country
|
| 129 |
+
root_key = "3166-3"
|
| 130 |
+
|
| 131 |
+
|
| 132 |
+
class Scripts(pycountry.db.Database):
|
| 133 |
+
"""Provides access to an ISO 15924 database (Scripts)."""
|
| 134 |
+
|
| 135 |
+
data_class = "Script"
|
| 136 |
+
root_key = "15924"
|
| 137 |
+
|
| 138 |
+
|
| 139 |
+
class Currencies(pycountry.db.Database):
|
| 140 |
+
"""Provides access to an ISO 4217 database (Currencies)."""
|
| 141 |
+
|
| 142 |
+
data_class = "Currency"
|
| 143 |
+
root_key = "4217"
|
| 144 |
+
|
| 145 |
+
|
| 146 |
+
class Languages(pycountry.db.Database):
|
| 147 |
+
"""Provides access to an ISO 639-1/2T/3 database (Languages)."""
|
| 148 |
+
|
| 149 |
+
no_index = ["status", "scope", "type", "inverted_name", "common_name"]
|
| 150 |
+
|
| 151 |
+
data_class = "Language"
|
| 152 |
+
root_key = "639-3"
|
| 153 |
+
|
| 154 |
+
|
| 155 |
+
class LanguageFamilies(pycountry.db.Database):
|
| 156 |
+
"""Provides access to an ISO 639-5 database
|
| 157 |
+
(Language Families and Groups)."""
|
| 158 |
+
|
| 159 |
+
data_class = "LanguageFamily"
|
| 160 |
+
root_key = "639-5"
|
| 161 |
+
|
| 162 |
+
|
| 163 |
+
class SubdivisionHierarchy(pycountry.db.Data):
|
| 164 |
+
def __init__(self, **kw):
|
| 165 |
+
if "parent" in kw:
|
| 166 |
+
kw["parent_code"] = kw["parent"]
|
| 167 |
+
else:
|
| 168 |
+
kw["parent_code"] = None
|
| 169 |
+
super().__init__(**kw)
|
| 170 |
+
self.country_code = self.code.split("-")[0]
|
| 171 |
+
if self.parent_code is not None:
|
| 172 |
+
# Split the parent_code to check if the country_code is already present
|
| 173 |
+
parts = self.parent_code.split("-")
|
| 174 |
+
if parts[0] != self.country_code:
|
| 175 |
+
self.parent_code = f"{self.country_code}-{self.parent_code}"
|
| 176 |
+
|
| 177 |
+
@property
|
| 178 |
+
def country(self):
|
| 179 |
+
return countries.get(alpha_2=self.country_code)
|
| 180 |
+
|
| 181 |
+
@property
|
| 182 |
+
def parent(self):
|
| 183 |
+
if not self.parent_code:
|
| 184 |
+
return None
|
| 185 |
+
return subdivisions.get(code=self.parent_code)
|
| 186 |
+
|
| 187 |
+
|
| 188 |
+
class Subdivisions(pycountry.db.Database):
|
| 189 |
+
# Note: subdivisions can be hierarchical to other subdivisions. The
|
| 190 |
+
# parent_code attribute is related to other subdivisions, *not*
|
| 191 |
+
# the country!
|
| 192 |
+
|
| 193 |
+
data_class = SubdivisionHierarchy
|
| 194 |
+
no_index = ["name", "parent_code", "parent", "type"]
|
| 195 |
+
root_key = "3166-2"
|
| 196 |
+
|
| 197 |
+
def _load(self, *args, **kw):
|
| 198 |
+
super()._load(*args, **kw)
|
| 199 |
+
|
| 200 |
+
# Add index for the country code.
|
| 201 |
+
self.indices["country_code"] = {}
|
| 202 |
+
for subdivision in self:
|
| 203 |
+
divs = self.indices["country_code"].setdefault(
|
| 204 |
+
subdivision.country_code.lower(), set()
|
| 205 |
+
)
|
| 206 |
+
divs.add(subdivision)
|
| 207 |
+
|
| 208 |
+
def get(self, **kw):
|
| 209 |
+
default = kw.setdefault("default", None)
|
| 210 |
+
subdivisions = super().get(**kw)
|
| 211 |
+
if subdivisions is default and "country_code" in kw:
|
| 212 |
+
# This handles the case where we know about a country but there
|
| 213 |
+
# are no subdivisions: we return an empty list in this case
|
| 214 |
+
# (sticking to the expected type here) instead of None.
|
| 215 |
+
if countries.get(alpha_2=kw["country_code"]) is not None:
|
| 216 |
+
return []
|
| 217 |
+
return subdivisions
|
| 218 |
+
|
| 219 |
+
def match(self, query):
|
| 220 |
+
query = remove_accents(query.strip().lower())
|
| 221 |
+
matching_candidates = []
|
| 222 |
+
for candidate in subdivisions:
|
| 223 |
+
for v in candidate._fields.values():
|
| 224 |
+
if v is not None:
|
| 225 |
+
v = remove_accents(v.lower())
|
| 226 |
+
# Some names include alternative versions which we want to
|
| 227 |
+
# match exactly.
|
| 228 |
+
for w in v.split(";"):
|
| 229 |
+
if w == query:
|
| 230 |
+
matching_candidates.append(candidate)
|
| 231 |
+
break
|
| 232 |
+
|
| 233 |
+
return matching_candidates
|
| 234 |
+
|
| 235 |
+
def partial_match(self, query):
|
| 236 |
+
query = remove_accents(query.strip().lower())
|
| 237 |
+
matching_candidates = []
|
| 238 |
+
for candidate in subdivisions:
|
| 239 |
+
v = candidate._fields.get("name")
|
| 240 |
+
v = remove_accents(v.lower())
|
| 241 |
+
if query in v:
|
| 242 |
+
matching_candidates.append(candidate)
|
| 243 |
+
|
| 244 |
+
return matching_candidates
|
| 245 |
+
|
| 246 |
+
def search_fuzzy(self, query: str) -> List[Type["Subdivisions"]]:
|
| 247 |
+
query = remove_accents(query.strip().lower())
|
| 248 |
+
|
| 249 |
+
# A Subdivision's code to points mapping for later sorting subdivisions
|
| 250 |
+
# based on the query's matching incidence.
|
| 251 |
+
results: dict[str, int] = {}
|
| 252 |
+
|
| 253 |
+
def add_result(
|
| 254 |
+
subdivision: "pycountry.db.Subdivision", points: int
|
| 255 |
+
) -> None:
|
| 256 |
+
results.setdefault(subdivision.code, 0)
|
| 257 |
+
results[subdivision.code] += points
|
| 258 |
+
|
| 259 |
+
# Prio 1: exact matches on subdivision names
|
| 260 |
+
match_subdivisions = self.match(query)
|
| 261 |
+
for candidate in match_subdivisions:
|
| 262 |
+
add_result(candidate, 50)
|
| 263 |
+
|
| 264 |
+
# Prio 2: partial matches on subdivision names
|
| 265 |
+
partial_match_subdivisions = self.partial_match(query)
|
| 266 |
+
for candidate in partial_match_subdivisions:
|
| 267 |
+
v = candidate._fields.get("name")
|
| 268 |
+
v = remove_accents(v.lower())
|
| 269 |
+
if query in v:
|
| 270 |
+
add_result(candidate, max([1, 5 - v.find(query)]))
|
| 271 |
+
|
| 272 |
+
if not results:
|
| 273 |
+
raise LookupError(query)
|
| 274 |
+
|
| 275 |
+
sorted_results = [
|
| 276 |
+
self.get(code=x[0])
|
| 277 |
+
# sort by points first, by alpha2 code second, and to ensure stable
|
| 278 |
+
# results the negative value allows us to sort reversely on the
|
| 279 |
+
# points but ascending on the country code.
|
| 280 |
+
for x in sorted(results.items(), key=lambda x: (-x[1], x[0]))
|
| 281 |
+
]
|
| 282 |
+
return sorted_results
|
| 283 |
+
|
| 284 |
+
|
| 285 |
+
# Initialize instances with type hints
|
| 286 |
+
countries: ExistingCountries = ExistingCountries(
|
| 287 |
+
os.path.join(DATABASE_DIR, "iso3166-1.json")
|
| 288 |
+
)
|
| 289 |
+
subdivisions: Subdivisions = Subdivisions(
|
| 290 |
+
os.path.join(DATABASE_DIR, "iso3166-2.json")
|
| 291 |
+
)
|
| 292 |
+
historic_countries: HistoricCountries = HistoricCountries(
|
| 293 |
+
os.path.join(DATABASE_DIR, "iso3166-3.json")
|
| 294 |
+
)
|
| 295 |
+
|
| 296 |
+
currencies: Currencies = Currencies(os.path.join(DATABASE_DIR, "iso4217.json"))
|
| 297 |
+
|
| 298 |
+
languages: Languages = Languages(os.path.join(DATABASE_DIR, "iso639-3.json"))
|
| 299 |
+
language_families: LanguageFamilies = LanguageFamilies(
|
| 300 |
+
os.path.join(DATABASE_DIR, "iso639-5.json")
|
| 301 |
+
)
|
| 302 |
+
|
| 303 |
+
scripts: Scripts = Scripts(os.path.join(DATABASE_DIR, "iso15924.json"))
|
vllm/lib/python3.10/site-packages/pycountry/databases/iso3166-2.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
vllm/lib/python3.10/site-packages/pycountry/databases/iso639-3.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
vllm/lib/python3.10/site-packages/pycountry/databases/iso639-5.json
ADDED
|
@@ -0,0 +1,464 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"639-5": [
|
| 3 |
+
{
|
| 4 |
+
"alpha_3": "aav",
|
| 5 |
+
"name": "Austro-Asiatic languages"
|
| 6 |
+
},
|
| 7 |
+
{
|
| 8 |
+
"alpha_3": "afa",
|
| 9 |
+
"name": "Afro-Asiatic languages"
|
| 10 |
+
},
|
| 11 |
+
{
|
| 12 |
+
"alpha_3": "alg",
|
| 13 |
+
"name": "Algonquian languages"
|
| 14 |
+
},
|
| 15 |
+
{
|
| 16 |
+
"alpha_3": "alv",
|
| 17 |
+
"name": "Atlantic-Congo languages"
|
| 18 |
+
},
|
| 19 |
+
{
|
| 20 |
+
"alpha_3": "apa",
|
| 21 |
+
"name": "Apache languages"
|
| 22 |
+
},
|
| 23 |
+
{
|
| 24 |
+
"alpha_3": "aqa",
|
| 25 |
+
"name": "Alacalufan languages"
|
| 26 |
+
},
|
| 27 |
+
{
|
| 28 |
+
"alpha_3": "aql",
|
| 29 |
+
"name": "Algic languages"
|
| 30 |
+
},
|
| 31 |
+
{
|
| 32 |
+
"alpha_3": "art",
|
| 33 |
+
"name": "Artificial languages"
|
| 34 |
+
},
|
| 35 |
+
{
|
| 36 |
+
"alpha_3": "ath",
|
| 37 |
+
"name": "Athapascan languages"
|
| 38 |
+
},
|
| 39 |
+
{
|
| 40 |
+
"alpha_3": "auf",
|
| 41 |
+
"name": "Arauan languages"
|
| 42 |
+
},
|
| 43 |
+
{
|
| 44 |
+
"alpha_3": "aus",
|
| 45 |
+
"name": "Australian languages"
|
| 46 |
+
},
|
| 47 |
+
{
|
| 48 |
+
"alpha_3": "awd",
|
| 49 |
+
"name": "Arawakan languages"
|
| 50 |
+
},
|
| 51 |
+
{
|
| 52 |
+
"alpha_3": "azc",
|
| 53 |
+
"name": "Uto-Aztecan languages"
|
| 54 |
+
},
|
| 55 |
+
{
|
| 56 |
+
"alpha_3": "bad",
|
| 57 |
+
"name": "Banda languages"
|
| 58 |
+
},
|
| 59 |
+
{
|
| 60 |
+
"alpha_3": "bai",
|
| 61 |
+
"name": "Bamileke languages"
|
| 62 |
+
},
|
| 63 |
+
{
|
| 64 |
+
"alpha_3": "bat",
|
| 65 |
+
"name": "Baltic languages"
|
| 66 |
+
},
|
| 67 |
+
{
|
| 68 |
+
"alpha_3": "ber",
|
| 69 |
+
"name": "Berber languages"
|
| 70 |
+
},
|
| 71 |
+
{
|
| 72 |
+
"alpha_3": "bih",
|
| 73 |
+
"name": "Bihari languages"
|
| 74 |
+
},
|
| 75 |
+
{
|
| 76 |
+
"alpha_3": "bnt",
|
| 77 |
+
"name": "Bantu languages"
|
| 78 |
+
},
|
| 79 |
+
{
|
| 80 |
+
"alpha_3": "btk",
|
| 81 |
+
"name": "Batak languages"
|
| 82 |
+
},
|
| 83 |
+
{
|
| 84 |
+
"alpha_3": "cai",
|
| 85 |
+
"name": "Central American Indian languages"
|
| 86 |
+
},
|
| 87 |
+
{
|
| 88 |
+
"alpha_3": "cau",
|
| 89 |
+
"name": "Caucasian languages"
|
| 90 |
+
},
|
| 91 |
+
{
|
| 92 |
+
"alpha_3": "cba",
|
| 93 |
+
"name": "Chibchan languages"
|
| 94 |
+
},
|
| 95 |
+
{
|
| 96 |
+
"alpha_3": "ccn",
|
| 97 |
+
"name": "North Caucasian languages"
|
| 98 |
+
},
|
| 99 |
+
{
|
| 100 |
+
"alpha_3": "ccs",
|
| 101 |
+
"name": "South Caucasian languages"
|
| 102 |
+
},
|
| 103 |
+
{
|
| 104 |
+
"alpha_3": "cdc",
|
| 105 |
+
"name": "Chadic languages"
|
| 106 |
+
},
|
| 107 |
+
{
|
| 108 |
+
"alpha_3": "cdd",
|
| 109 |
+
"name": "Caddoan languages"
|
| 110 |
+
},
|
| 111 |
+
{
|
| 112 |
+
"alpha_3": "cel",
|
| 113 |
+
"name": "Celtic languages"
|
| 114 |
+
},
|
| 115 |
+
{
|
| 116 |
+
"alpha_3": "cmc",
|
| 117 |
+
"name": "Chamic languages"
|
| 118 |
+
},
|
| 119 |
+
{
|
| 120 |
+
"alpha_3": "cpe",
|
| 121 |
+
"name": "Creoles and pidgins, English‑based"
|
| 122 |
+
},
|
| 123 |
+
{
|
| 124 |
+
"alpha_3": "cpf",
|
| 125 |
+
"name": "Creoles and pidgins, French‑based"
|
| 126 |
+
},
|
| 127 |
+
{
|
| 128 |
+
"alpha_3": "cpp",
|
| 129 |
+
"name": "Creoles and pidgins, Portuguese-based"
|
| 130 |
+
},
|
| 131 |
+
{
|
| 132 |
+
"alpha_3": "crp",
|
| 133 |
+
"name": "Creoles and pidgins"
|
| 134 |
+
},
|
| 135 |
+
{
|
| 136 |
+
"alpha_3": "csu",
|
| 137 |
+
"name": "Central Sudanic languages"
|
| 138 |
+
},
|
| 139 |
+
{
|
| 140 |
+
"alpha_3": "cus",
|
| 141 |
+
"name": "Cushitic languages"
|
| 142 |
+
},
|
| 143 |
+
{
|
| 144 |
+
"alpha_3": "day",
|
| 145 |
+
"name": "Land Dayak languages"
|
| 146 |
+
},
|
| 147 |
+
{
|
| 148 |
+
"alpha_3": "dmn",
|
| 149 |
+
"name": "Mande languages"
|
| 150 |
+
},
|
| 151 |
+
{
|
| 152 |
+
"alpha_3": "dra",
|
| 153 |
+
"name": "Dravidian languages"
|
| 154 |
+
},
|
| 155 |
+
{
|
| 156 |
+
"alpha_3": "egx",
|
| 157 |
+
"name": "Egyptian languages"
|
| 158 |
+
},
|
| 159 |
+
{
|
| 160 |
+
"alpha_3": "esx",
|
| 161 |
+
"name": "Eskimo-Aleut languages"
|
| 162 |
+
},
|
| 163 |
+
{
|
| 164 |
+
"alpha_3": "euq",
|
| 165 |
+
"name": "Basque (family)"
|
| 166 |
+
},
|
| 167 |
+
{
|
| 168 |
+
"alpha_3": "fiu",
|
| 169 |
+
"name": "Finno-Ugrian languages"
|
| 170 |
+
},
|
| 171 |
+
{
|
| 172 |
+
"alpha_3": "fox",
|
| 173 |
+
"name": "Formosan languages"
|
| 174 |
+
},
|
| 175 |
+
{
|
| 176 |
+
"alpha_3": "gem",
|
| 177 |
+
"name": "Germanic languages"
|
| 178 |
+
},
|
| 179 |
+
{
|
| 180 |
+
"alpha_3": "gme",
|
| 181 |
+
"name": "East Germanic languages"
|
| 182 |
+
},
|
| 183 |
+
{
|
| 184 |
+
"alpha_3": "gmq",
|
| 185 |
+
"name": "North Germanic languages"
|
| 186 |
+
},
|
| 187 |
+
{
|
| 188 |
+
"alpha_3": "gmw",
|
| 189 |
+
"name": "West Germanic languages"
|
| 190 |
+
},
|
| 191 |
+
{
|
| 192 |
+
"alpha_3": "grk",
|
| 193 |
+
"name": "Greek languages"
|
| 194 |
+
},
|
| 195 |
+
{
|
| 196 |
+
"alpha_3": "hmx",
|
| 197 |
+
"name": "Hmong-Mien languages"
|
| 198 |
+
},
|
| 199 |
+
{
|
| 200 |
+
"alpha_3": "hok",
|
| 201 |
+
"name": "Hokan languages"
|
| 202 |
+
},
|
| 203 |
+
{
|
| 204 |
+
"alpha_3": "hyx",
|
| 205 |
+
"name": "Armenian (family)"
|
| 206 |
+
},
|
| 207 |
+
{
|
| 208 |
+
"alpha_3": "iir",
|
| 209 |
+
"name": "Indo-Iranian languages"
|
| 210 |
+
},
|
| 211 |
+
{
|
| 212 |
+
"alpha_3": "ijo",
|
| 213 |
+
"name": "Ijo languages"
|
| 214 |
+
},
|
| 215 |
+
{
|
| 216 |
+
"alpha_3": "inc",
|
| 217 |
+
"name": "Indic languages"
|
| 218 |
+
},
|
| 219 |
+
{
|
| 220 |
+
"alpha_3": "ine",
|
| 221 |
+
"name": "Indo-European languages"
|
| 222 |
+
},
|
| 223 |
+
{
|
| 224 |
+
"alpha_3": "ira",
|
| 225 |
+
"name": "Iranian languages"
|
| 226 |
+
},
|
| 227 |
+
{
|
| 228 |
+
"alpha_3": "iro",
|
| 229 |
+
"name": "Iroquoian languages"
|
| 230 |
+
},
|
| 231 |
+
{
|
| 232 |
+
"alpha_3": "itc",
|
| 233 |
+
"name": "Italic languages"
|
| 234 |
+
},
|
| 235 |
+
{
|
| 236 |
+
"alpha_3": "jpx",
|
| 237 |
+
"name": "Japanese (family)"
|
| 238 |
+
},
|
| 239 |
+
{
|
| 240 |
+
"alpha_3": "kar",
|
| 241 |
+
"name": "Karen languages"
|
| 242 |
+
},
|
| 243 |
+
{
|
| 244 |
+
"alpha_3": "kdo",
|
| 245 |
+
"name": "Kordofanian languages"
|
| 246 |
+
},
|
| 247 |
+
{
|
| 248 |
+
"alpha_3": "khi",
|
| 249 |
+
"name": "Khoisan languages"
|
| 250 |
+
},
|
| 251 |
+
{
|
| 252 |
+
"alpha_3": "kro",
|
| 253 |
+
"name": "Kru languages"
|
| 254 |
+
},
|
| 255 |
+
{
|
| 256 |
+
"alpha_3": "map",
|
| 257 |
+
"name": "Austronesian languages"
|
| 258 |
+
},
|
| 259 |
+
{
|
| 260 |
+
"alpha_3": "mkh",
|
| 261 |
+
"name": "Mon-Khmer languages"
|
| 262 |
+
},
|
| 263 |
+
{
|
| 264 |
+
"alpha_3": "mno",
|
| 265 |
+
"name": "Manobo languages"
|
| 266 |
+
},
|
| 267 |
+
{
|
| 268 |
+
"alpha_3": "mun",
|
| 269 |
+
"name": "Munda languages"
|
| 270 |
+
},
|
| 271 |
+
{
|
| 272 |
+
"alpha_3": "myn",
|
| 273 |
+
"name": "Mayan languages"
|
| 274 |
+
},
|
| 275 |
+
{
|
| 276 |
+
"alpha_3": "nah",
|
| 277 |
+
"name": "Nahuatl languages"
|
| 278 |
+
},
|
| 279 |
+
{
|
| 280 |
+
"alpha_3": "nai",
|
| 281 |
+
"name": "North American Indian languages"
|
| 282 |
+
},
|
| 283 |
+
{
|
| 284 |
+
"alpha_3": "ngf",
|
| 285 |
+
"name": "Trans-New Guinea languages"
|
| 286 |
+
},
|
| 287 |
+
{
|
| 288 |
+
"alpha_3": "nic",
|
| 289 |
+
"name": "Niger-Kordofanian languages"
|
| 290 |
+
},
|
| 291 |
+
{
|
| 292 |
+
"alpha_3": "nub",
|
| 293 |
+
"name": "Nubian languages"
|
| 294 |
+
},
|
| 295 |
+
{
|
| 296 |
+
"alpha_3": "omq",
|
| 297 |
+
"name": "Oto-Manguean languages"
|
| 298 |
+
},
|
| 299 |
+
{
|
| 300 |
+
"alpha_3": "omv",
|
| 301 |
+
"name": "Omotic languages"
|
| 302 |
+
},
|
| 303 |
+
{
|
| 304 |
+
"alpha_3": "oto",
|
| 305 |
+
"name": "Otomian languages"
|
| 306 |
+
},
|
| 307 |
+
{
|
| 308 |
+
"alpha_3": "paa",
|
| 309 |
+
"name": "Papuan languages"
|
| 310 |
+
},
|
| 311 |
+
{
|
| 312 |
+
"alpha_3": "phi",
|
| 313 |
+
"name": "Philippine languages"
|
| 314 |
+
},
|
| 315 |
+
{
|
| 316 |
+
"alpha_3": "plf",
|
| 317 |
+
"name": "Central Malayo-Polynesian languages"
|
| 318 |
+
},
|
| 319 |
+
{
|
| 320 |
+
"alpha_3": "poz",
|
| 321 |
+
"name": "Malayo-Polynesian languages"
|
| 322 |
+
},
|
| 323 |
+
{
|
| 324 |
+
"alpha_3": "pqe",
|
| 325 |
+
"name": "Eastern Malayo-Polynesian languages"
|
| 326 |
+
},
|
| 327 |
+
{
|
| 328 |
+
"alpha_3": "pqw",
|
| 329 |
+
"name": "Western Malayo-Polynesian languages"
|
| 330 |
+
},
|
| 331 |
+
{
|
| 332 |
+
"alpha_3": "pra",
|
| 333 |
+
"name": "Prakrit languages"
|
| 334 |
+
},
|
| 335 |
+
{
|
| 336 |
+
"alpha_3": "qwe",
|
| 337 |
+
"name": "Quechuan (family)"
|
| 338 |
+
},
|
| 339 |
+
{
|
| 340 |
+
"alpha_3": "roa",
|
| 341 |
+
"name": "Romance languages"
|
| 342 |
+
},
|
| 343 |
+
{
|
| 344 |
+
"alpha_3": "sai",
|
| 345 |
+
"name": "South American Indian languages"
|
| 346 |
+
},
|
| 347 |
+
{
|
| 348 |
+
"alpha_3": "sal",
|
| 349 |
+
"name": "Salishan languages"
|
| 350 |
+
},
|
| 351 |
+
{
|
| 352 |
+
"alpha_3": "sdv",
|
| 353 |
+
"name": "Eastern Sudanic languages"
|
| 354 |
+
},
|
| 355 |
+
{
|
| 356 |
+
"alpha_3": "sem",
|
| 357 |
+
"name": "Semitic languages"
|
| 358 |
+
},
|
| 359 |
+
{
|
| 360 |
+
"alpha_3": "sgn",
|
| 361 |
+
"name": "sign languages"
|
| 362 |
+
},
|
| 363 |
+
{
|
| 364 |
+
"alpha_3": "sio",
|
| 365 |
+
"name": "Siouan languages"
|
| 366 |
+
},
|
| 367 |
+
{
|
| 368 |
+
"alpha_3": "sit",
|
| 369 |
+
"name": "Sino-Tibetan languages"
|
| 370 |
+
},
|
| 371 |
+
{
|
| 372 |
+
"alpha_3": "sla",
|
| 373 |
+
"name": "Slavic languages"
|
| 374 |
+
},
|
| 375 |
+
{
|
| 376 |
+
"alpha_3": "smi",
|
| 377 |
+
"name": "Sami languages"
|
| 378 |
+
},
|
| 379 |
+
{
|
| 380 |
+
"alpha_3": "son",
|
| 381 |
+
"name": "Songhai languages"
|
| 382 |
+
},
|
| 383 |
+
{
|
| 384 |
+
"alpha_3": "sqj",
|
| 385 |
+
"name": "Albanian languages"
|
| 386 |
+
},
|
| 387 |
+
{
|
| 388 |
+
"alpha_3": "ssa",
|
| 389 |
+
"name": "Nilo-Saharan languages"
|
| 390 |
+
},
|
| 391 |
+
{
|
| 392 |
+
"alpha_3": "syd",
|
| 393 |
+
"name": "Samoyedic languages"
|
| 394 |
+
},
|
| 395 |
+
{
|
| 396 |
+
"alpha_3": "tai",
|
| 397 |
+
"name": "Tai languages"
|
| 398 |
+
},
|
| 399 |
+
{
|
| 400 |
+
"alpha_3": "tbq",
|
| 401 |
+
"name": "Tibeto-Burman languages"
|
| 402 |
+
},
|
| 403 |
+
{
|
| 404 |
+
"alpha_3": "trk",
|
| 405 |
+
"name": "Turkic languages"
|
| 406 |
+
},
|
| 407 |
+
{
|
| 408 |
+
"alpha_3": "tup",
|
| 409 |
+
"name": "Tupi languages"
|
| 410 |
+
},
|
| 411 |
+
{
|
| 412 |
+
"alpha_3": "tut",
|
| 413 |
+
"name": "Altaic languages"
|
| 414 |
+
},
|
| 415 |
+
{
|
| 416 |
+
"alpha_3": "tuw",
|
| 417 |
+
"name": "Tungus languages"
|
| 418 |
+
},
|
| 419 |
+
{
|
| 420 |
+
"alpha_3": "urj",
|
| 421 |
+
"name": "Uralic languages"
|
| 422 |
+
},
|
| 423 |
+
{
|
| 424 |
+
"alpha_3": "wak",
|
| 425 |
+
"name": "Wakashan languages"
|
| 426 |
+
},
|
| 427 |
+
{
|
| 428 |
+
"alpha_3": "wen",
|
| 429 |
+
"name": "Sorbian languages"
|
| 430 |
+
},
|
| 431 |
+
{
|
| 432 |
+
"alpha_3": "xgn",
|
| 433 |
+
"name": "Mongolian languages"
|
| 434 |
+
},
|
| 435 |
+
{
|
| 436 |
+
"alpha_3": "xnd",
|
| 437 |
+
"name": "Na-Dene languages"
|
| 438 |
+
},
|
| 439 |
+
{
|
| 440 |
+
"alpha_3": "ypk",
|
| 441 |
+
"name": "Yupik languages"
|
| 442 |
+
},
|
| 443 |
+
{
|
| 444 |
+
"alpha_3": "zhx",
|
| 445 |
+
"name": "Chinese (family)"
|
| 446 |
+
},
|
| 447 |
+
{
|
| 448 |
+
"alpha_3": "zle",
|
| 449 |
+
"name": "East Slavic languages"
|
| 450 |
+
},
|
| 451 |
+
{
|
| 452 |
+
"alpha_3": "zls",
|
| 453 |
+
"name": "South Slavic languages"
|
| 454 |
+
},
|
| 455 |
+
{
|
| 456 |
+
"alpha_3": "zlw",
|
| 457 |
+
"name": "West Slavic languages"
|
| 458 |
+
},
|
| 459 |
+
{
|
| 460 |
+
"alpha_3": "znd",
|
| 461 |
+
"name": "Zande languages"
|
| 462 |
+
}
|
| 463 |
+
]
|
| 464 |
+
}
|
vllm/lib/python3.10/site-packages/pycountry/db.py
ADDED
|
@@ -0,0 +1,200 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import json
|
| 2 |
+
import logging
|
| 3 |
+
import threading
|
| 4 |
+
from typing import Any, Iterator, List, Optional, Type, Union
|
| 5 |
+
|
| 6 |
+
logger = logging.getLogger("pycountry.db")
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
class Data:
|
| 10 |
+
def __init__(self, **fields: str):
|
| 11 |
+
self._fields = fields
|
| 12 |
+
|
| 13 |
+
def __getattr__(self, key):
|
| 14 |
+
if key in self._fields:
|
| 15 |
+
return self._fields[key]
|
| 16 |
+
raise AttributeError(key)
|
| 17 |
+
|
| 18 |
+
def __setattr__(self, key: str, value: str) -> None:
|
| 19 |
+
if key != "_fields":
|
| 20 |
+
self._fields[key] = value
|
| 21 |
+
super().__setattr__(key, value)
|
| 22 |
+
|
| 23 |
+
def __repr__(self) -> str:
|
| 24 |
+
cls_name = self.__class__.__name__
|
| 25 |
+
fields = ", ".join("%s=%r" % i for i in sorted(self._fields.items()))
|
| 26 |
+
return f"{cls_name}({fields})"
|
| 27 |
+
|
| 28 |
+
def __dir__(self) -> List[str]:
|
| 29 |
+
return dir(self.__class__) + list(self._fields)
|
| 30 |
+
|
| 31 |
+
def __iter__(self):
|
| 32 |
+
# allow casting into a dict
|
| 33 |
+
for field in self._fields:
|
| 34 |
+
yield field, getattr(self, field)
|
| 35 |
+
|
| 36 |
+
|
| 37 |
+
class Country(Data):
|
| 38 |
+
pass
|
| 39 |
+
|
| 40 |
+
|
| 41 |
+
class Subdivision(Data):
|
| 42 |
+
pass
|
| 43 |
+
|
| 44 |
+
|
| 45 |
+
def lazy_load(f):
|
| 46 |
+
def load_if_needed(self, *args, **kw):
|
| 47 |
+
if not self._is_loaded:
|
| 48 |
+
with self._load_lock:
|
| 49 |
+
self._load()
|
| 50 |
+
return f(self, *args, **kw)
|
| 51 |
+
|
| 52 |
+
return load_if_needed
|
| 53 |
+
|
| 54 |
+
|
| 55 |
+
class Database:
|
| 56 |
+
data_class: Union[Type, str]
|
| 57 |
+
root_key: Optional[str] = None
|
| 58 |
+
no_index: List[str] = []
|
| 59 |
+
|
| 60 |
+
def __init__(self, filename: str) -> None:
|
| 61 |
+
self.filename = filename
|
| 62 |
+
self._is_loaded = False
|
| 63 |
+
self._load_lock = threading.Lock()
|
| 64 |
+
|
| 65 |
+
if isinstance(self.data_class, str):
|
| 66 |
+
self.factory = type(self.data_class, (Data,), {})
|
| 67 |
+
else:
|
| 68 |
+
self.factory = self.data_class
|
| 69 |
+
|
| 70 |
+
def _clear(self):
|
| 71 |
+
self._is_loaded = False
|
| 72 |
+
self.objects = []
|
| 73 |
+
self.index_names = set()
|
| 74 |
+
self.indices = {}
|
| 75 |
+
|
| 76 |
+
def _load(self) -> None:
|
| 77 |
+
if self._is_loaded:
|
| 78 |
+
# Help keeping the _load_if_needed code easier
|
| 79 |
+
# to read.
|
| 80 |
+
return
|
| 81 |
+
self._clear()
|
| 82 |
+
|
| 83 |
+
with open(self.filename, encoding="utf-8") as f:
|
| 84 |
+
tree = json.load(f)
|
| 85 |
+
|
| 86 |
+
for entry in tree[self.root_key]:
|
| 87 |
+
obj = self.factory(**entry)
|
| 88 |
+
self.objects.append(obj)
|
| 89 |
+
# Inject into index.
|
| 90 |
+
for key, value in entry.items():
|
| 91 |
+
if key in self.no_index:
|
| 92 |
+
continue
|
| 93 |
+
# Lookups and searches are case insensitive. Normalize
|
| 94 |
+
# here.
|
| 95 |
+
index = self.indices.setdefault(key, {})
|
| 96 |
+
value = value.lower()
|
| 97 |
+
if value in index:
|
| 98 |
+
logger.debug(
|
| 99 |
+
"%s %r already taken in index %r and will be "
|
| 100 |
+
"ignored. This is an error in the databases."
|
| 101 |
+
% (self.factory.__name__, value, key)
|
| 102 |
+
)
|
| 103 |
+
index[value] = obj
|
| 104 |
+
|
| 105 |
+
self._is_loaded = True
|
| 106 |
+
|
| 107 |
+
# Public API
|
| 108 |
+
|
| 109 |
+
@lazy_load
|
| 110 |
+
def add_entry(self, **kw):
|
| 111 |
+
# create the object with the correct dynamic type
|
| 112 |
+
obj = self.factory(**kw)
|
| 113 |
+
|
| 114 |
+
# append object
|
| 115 |
+
self.objects.append(obj)
|
| 116 |
+
|
| 117 |
+
# update indices
|
| 118 |
+
for key, value in kw.items():
|
| 119 |
+
if key in self.no_index:
|
| 120 |
+
continue
|
| 121 |
+
value = value.lower()
|
| 122 |
+
index = self.indices.setdefault(key, {})
|
| 123 |
+
index[value] = obj
|
| 124 |
+
|
| 125 |
+
@lazy_load
|
| 126 |
+
def remove_entry(self, **kw):
|
| 127 |
+
# make sure that we receive None if no entry found
|
| 128 |
+
if "default" in kw:
|
| 129 |
+
del kw["default"]
|
| 130 |
+
obj = self.get(**kw)
|
| 131 |
+
if not obj:
|
| 132 |
+
raise KeyError(
|
| 133 |
+
f"{self.factory.__name__} not found and cannot be removed: {kw}"
|
| 134 |
+
)
|
| 135 |
+
|
| 136 |
+
# remove object
|
| 137 |
+
self.objects.remove(obj)
|
| 138 |
+
|
| 139 |
+
# update indices
|
| 140 |
+
for key, value in obj:
|
| 141 |
+
if key in self.no_index:
|
| 142 |
+
continue
|
| 143 |
+
value = value.lower()
|
| 144 |
+
index = self.indices.setdefault(key, {})
|
| 145 |
+
if value in index:
|
| 146 |
+
del index[value]
|
| 147 |
+
|
| 148 |
+
@lazy_load
|
| 149 |
+
def __iter__(self) -> Iterator["Database"]:
|
| 150 |
+
return iter(self.objects)
|
| 151 |
+
|
| 152 |
+
@lazy_load
|
| 153 |
+
def __len__(self) -> int:
|
| 154 |
+
return len(self.objects)
|
| 155 |
+
|
| 156 |
+
@lazy_load
|
| 157 |
+
def get(
|
| 158 |
+
self, *, default: Optional[Any] = None, **kw: Optional[str]
|
| 159 |
+
) -> Optional[Any]:
|
| 160 |
+
if len(kw) != 1:
|
| 161 |
+
raise TypeError("Only one criteria may be given")
|
| 162 |
+
field, value = kw.popitem()
|
| 163 |
+
if not isinstance(value, str):
|
| 164 |
+
raise LookupError()
|
| 165 |
+
# Normalize for case-insensitivity
|
| 166 |
+
value = value.lower()
|
| 167 |
+
index = self.indices[field]
|
| 168 |
+
try:
|
| 169 |
+
return index[value]
|
| 170 |
+
except KeyError:
|
| 171 |
+
# Pythonic APIs implementing get() shouldn't raise KeyErrors.
|
| 172 |
+
# Those are a bit unexpected and they should rather support
|
| 173 |
+
# returning `None` by default and allow customization.
|
| 174 |
+
return default
|
| 175 |
+
|
| 176 |
+
@lazy_load
|
| 177 |
+
def lookup(self, value: str) -> Type:
|
| 178 |
+
if not isinstance(value, str):
|
| 179 |
+
raise LookupError()
|
| 180 |
+
|
| 181 |
+
# Normalize for case-insensitivity
|
| 182 |
+
value = value.lower()
|
| 183 |
+
|
| 184 |
+
# Use indexes first
|
| 185 |
+
for key in self.indices:
|
| 186 |
+
try:
|
| 187 |
+
return self.indices[key][value]
|
| 188 |
+
except LookupError:
|
| 189 |
+
pass
|
| 190 |
+
|
| 191 |
+
# Use non-indexed values now. Avoid going through indexed values.
|
| 192 |
+
for candidate in self:
|
| 193 |
+
for k in self.no_index:
|
| 194 |
+
v = candidate._fields.get(k)
|
| 195 |
+
if v is None:
|
| 196 |
+
continue
|
| 197 |
+
if v.lower() == value:
|
| 198 |
+
return candidate
|
| 199 |
+
|
| 200 |
+
raise LookupError("Could not find a record for %r" % value)
|
vllm/lib/python3.10/site-packages/pycountry/locales/bn_BD/LC_MESSAGES/iso15924.mo
ADDED
|
Binary file (14.8 kB). View file
|
|
|
vllm/lib/python3.10/site-packages/pycountry/locales/bn_BD/LC_MESSAGES/iso3166-2.mo
ADDED
|
Binary file (1.16 kB). View file
|
|
|
vllm/lib/python3.10/site-packages/pycountry/locales/fy/LC_MESSAGES/iso3166-1.mo
ADDED
|
Binary file (9.36 kB). View file
|
|
|
vllm/lib/python3.10/site-packages/pycountry/locales/hi/LC_MESSAGES/iso3166-1.mo
ADDED
|
Binary file (35.3 kB). View file
|
|
|
vllm/lib/python3.10/site-packages/pycountry/locales/hi/LC_MESSAGES/iso3166-3.mo
ADDED
|
Binary file (3.97 kB). View file
|
|
|
vllm/lib/python3.10/site-packages/pycountry/locales/hi/LC_MESSAGES/iso639-3.mo
ADDED
|
Binary file (6.81 kB). View file
|
|
|
vllm/lib/python3.10/site-packages/pycountry/locales/hi/LC_MESSAGES/iso639-5.mo
ADDED
|
Binary file (632 Bytes). View file
|
|
|
vllm/lib/python3.10/site-packages/pycountry/locales/kl/LC_MESSAGES/iso3166-1.mo
ADDED
|
Binary file (530 Bytes). View file
|
|
|
vllm/lib/python3.10/site-packages/pycountry/locales/ko/LC_MESSAGES/iso3166-1.mo
ADDED
|
Binary file (24.3 kB). View file
|
|
|
vllm/lib/python3.10/site-packages/pycountry/locales/ko/LC_MESSAGES/iso4217.mo
ADDED
|
Binary file (10.8 kB). View file
|
|
|
vllm/lib/python3.10/site-packages/pycountry/locales/ko/LC_MESSAGES/iso639-3.mo
ADDED
|
Binary file (18 kB). View file
|
|
|
vllm/lib/python3.10/site-packages/pycountry/locales/ky/LC_MESSAGES/iso3166-1.mo
ADDED
|
Binary file (29.1 kB). View file
|
|
|
vllm/lib/python3.10/site-packages/pycountry/locales/ky/LC_MESSAGES/iso3166-2.mo
ADDED
|
Binary file (1.42 kB). View file
|
|
|
vllm/lib/python3.10/site-packages/pycountry/locales/pa/LC_MESSAGES/iso3166-1.mo
ADDED
|
Binary file (30.9 kB). View file
|
|
|
vllm/lib/python3.10/site-packages/pycountry/locales/pa/LC_MESSAGES/iso3166-3.mo
ADDED
|
Binary file (3.56 kB). View file
|
|
|
vllm/lib/python3.10/site-packages/pycountry/locales/ru/LC_MESSAGES/iso15924.mo
ADDED
|
Binary file (12.7 kB). View file
|
|
|
vllm/lib/python3.10/site-packages/pycountry/locales/ru/LC_MESSAGES/iso3166-1.mo
ADDED
|
Binary file (29.8 kB). View file
|
|
|
vllm/lib/python3.10/site-packages/pycountry/locales/ru/LC_MESSAGES/iso3166-2.mo
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:23e47100b308766946a6655034ea20f2426b27e82e1af16a0fe3618b9478e38e
|
| 3 |
+
size 105964
|
vllm/lib/python3.10/site-packages/pycountry/locales/ru/LC_MESSAGES/iso3166-3.mo
ADDED
|
Binary file (3.48 kB). View file
|
|
|
vllm/lib/python3.10/site-packages/pycountry/locales/ru/LC_MESSAGES/iso4217.mo
ADDED
|
Binary file (11.5 kB). View file
|
|
|