├── .env ├── requirements.txt ├── README.md ├── openai_api.py └── LICENSE /.env: -------------------------------------------------------------------------------- 1 | OPENAI_BASEURL= 2 | OPENAI_API_KEY= -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | openai 2 | orjson 3 | fastapi 4 | pydantic 5 | loguru 6 | uvicorn 7 | python-dotenv 8 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | # Qwen OpenAI API Tools Middleware 3 | 4 | ## Introduction 5 | 6 | This is an OpenAI API-compatible server based on the Qwen model, implementing tool calling functionality using the ReAct strategy. Qwen, a large language model developed by Alibaba Cloud, is equipped with the capability to call tools. However, common inference engines such as vLLM and sglang do not support tools APIs. 7 | 8 | The purpose of this project is to provide a middleware enabling developers to easily integrate Qwen's tool calling capabilities into their applications. 9 | 10 | ## Installation 11 | 12 | 1. Clone or download this project to your local machine. 13 | 2. Install the required libraries using `pip`: 14 | 15 | ```bash 16 | pip install -r requirements.txt 17 | ``` 18 | 19 | ## Running the Server 20 | 21 | Start the server: 22 | 23 | ```bash 24 | python openai_api.py 25 | ``` 26 | 27 | By default, the server will run on `http://localhost:8600`. 28 | 29 | ## Usage 30 | 31 | You can call the API using `curl` or any HTTP client (such as Postman). For example: 32 | 33 | ```bash 34 | curl -X 'POST' \ 35 | 'http://localhost:8600/v1/chat/completions' \ 36 | -H 'accept: application/json' \ 37 | -H 'Content-Type: application/json' \ 38 | -d '{ 39 | "model": "gpt-4o", 40 | "messages": [ 41 | { 42 | "role": "user", 43 | "content": "What\'s the weather like in Boston today?" 44 | } 45 | ], 46 | "tools": [ 47 | { 48 | "type": "function", 49 | "function": { 50 | "name": "get_current_weather", 51 | "description": "Get the current weather in a given location", 52 | "parameters": { 53 | "type": "object", 54 | "properties": { 55 | "location": { 56 | "type": "string", 57 | "description": "The city and state, e.g. San Francisco, CA" 58 | }, 59 | "unit": { 60 | "type": "string", 61 | "enum": ["celsius", "fahrenheit"] 62 | } 63 | }, 64 | "required": ["location"] 65 | } 66 | } 67 | } 68 | ], 69 | "tool_choice": "auto", 70 | "stream":true 71 | }' 72 | ``` 73 | 74 | --- 75 | 76 | ## 简介 77 | 78 | 这是一个基于Qwen模型的OpenAI API格式的服务器,用 ReAct 策略实现了(流式)工具调用功能。 79 | 80 | Qwen是阿里云开发的大型语言模型,具备工具调用能力。但是常见的推理引擎,如 vLLM,sglang 均不支持 tools API。 81 | 82 | 本项目旨在使得开发者可以轻松地集成Qwen的工具调用能力。 83 | 84 | ## 安装 85 | 86 | 1. 克隆或下载本项目到本地。 87 | 2. 使用`pip`安装依赖库: 88 | 89 | ```bash 90 | pip install -r requirements.txt 91 | ``` 92 | 93 | ## 运行 94 | 95 | 启动服务器: 96 | 97 | ```bash 98 | python openai_api.py 99 | ``` 100 | 101 | 默认情况下,服务器将在本地的`http://localhost:8600`上运行。 102 | 103 | ## 使用 104 | 105 | 你可以使用`curl`或任何HTTP客户端(如Postman)来调用API。例如: 106 | 107 | ```bash 108 | curl -X 'POST' \ 109 | 'http://localhost:8600/v1/chat/completions' \ 110 | -H 'accept: application/json' \ 111 | -H 'Content-Type: application/json' \ 112 | -d '{ 113 | "model": "gpt-4o", 114 | "messages": [ 115 | { 116 | "role": "user", 117 | "content": "What'\''s the weather like in Boston today?" 118 | } 119 | ], 120 | "tools": [ 121 | { 122 | "type": "function", 123 | "function": { 124 | "name": "get_current_weather", 125 | "description": "Get the current weather in a given location", 126 | "parameters": { 127 | "type": "object", 128 | "properties": { 129 | "location": { 130 | "type": "string", 131 | "description": "The city and state, e.g. San Francisco, CA" 132 | }, 133 | "unit": { 134 | "type": "string", 135 | "enum": ["celsius", "fahrenheit"] 136 | } 137 | }, 138 | "required": ["location"] 139 | } 140 | } 141 | } 142 | ], 143 | "tool_choice": "auto", 144 | "stream":true 145 | }' 146 | ``` 147 | 148 | -------------------------------------------------------------------------------- /openai_api.py: -------------------------------------------------------------------------------- 1 | import json 2 | import os 3 | import uuid 4 | from typing import Any, List, Optional, Union 5 | 6 | import openai 7 | import orjson 8 | from dotenv import load_dotenv 9 | from fastapi import FastAPI, HTTPException 10 | from fastapi.responses import JSONResponse, StreamingResponse 11 | from loguru import logger 12 | from openai.types.chat import ChatCompletionMessageParam, ChatCompletionToolParam 13 | from pydantic import BaseModel 14 | 15 | app = FastAPI() 16 | 17 | # 设置Qwen OpenAI API的URL和密钥 18 | load_dotenv(override=True) 19 | OPENAI_BASEURL = os.getenv("OPENAI_BASEURL") 20 | OPENAI_API_KEY = os.getenv("OPENAI_API_KEY") 21 | CLIENT = openai.AsyncOpenAI(base_url=OPENAI_BASEURL, api_key=OPENAI_API_KEY) 22 | 23 | 24 | class ChatCompletionRequest(BaseModel): 25 | class Config: 26 | extra = "allow" 27 | 28 | messages: list[dict[str, Any]] 29 | stream: bool = False 30 | temperature: float = 1.0 31 | top_p: float = 1.0 32 | 33 | tools: Optional[list[ChatCompletionToolParam]] = None 34 | stop: Union[str, List[str], None] = None 35 | 36 | 37 | TOOL_DESC = """{name_for_model}: Call this tool to interact with the {name_for_human} API. What is the {name_for_human} API useful for? {description_for_model} Parameters: {parameters} Format the arguments as a JSON object.""" 38 | REACT_INSTRUCTION = """Answer the following questions as best you can. You have access to the following APIs: 39 | 40 | {tools_text} 41 | 42 | Use the following format: 43 | 44 | Question: the input question you must answer 45 | Thought: you should always think about what to do 46 | Action: the action to take, should be one of [{tools_name_text}] 47 | Action Input: the input to the action 48 | Observation: the result of the action 49 | ... (this Thought/Action/Action Input/Observation can be repeated zero or more times) 50 | Thought: I now know the final answer 51 | Final Answer: the final answer to the original input question 52 | 53 | Begin!""" 54 | 55 | 56 | def process_tools_from_prompt( 57 | messages: list[ChatCompletionMessageParam], 58 | tools: list[ChatCompletionToolParam] | None, 59 | ) -> list[ChatCompletionMessageParam]: 60 | if tools: 61 | tools_text = [] 62 | tools_name_text = [] 63 | for func_info in tools: 64 | parameters = [] 65 | fp = func_info["function"].get("parameters", {}) 66 | if fp: 67 | required_parameters = fp.get("required", []) 68 | for name, p in fp["properties"].items(): # type: ignore 69 | param = dict({"name": name}, **p) 70 | if name in required_parameters: 71 | param["required"] = True 72 | parameters.append(param) 73 | 74 | name = func_info["function"]["name"] 75 | desc = func_info["function"].get("description", "") 76 | tool_string = TOOL_DESC.format( 77 | name_for_model=name, 78 | name_for_human=name, 79 | description_for_model=desc, 80 | parameters=json.dumps(parameters, ensure_ascii=False), 81 | ) 82 | tools_text.append(tool_string) 83 | tools_name_text.append(name) 84 | tools_text_string = "\n\n".join(tools_text) 85 | tools_name_text_string = ", ".join(tools_name_text) 86 | tool_system = REACT_INSTRUCTION.format( 87 | tools_text=tools_text_string, 88 | tools_name_text=tools_name_text_string, 89 | ) 90 | else: 91 | tool_system = "" 92 | 93 | new_messages = [] 94 | for message in messages: 95 | role = message["role"] 96 | content = message.get("content") 97 | if tools: 98 | if role == "user": 99 | if tool_system: 100 | content = tool_system + f"\n\nQuestion: {content}" 101 | tool_system = "" 102 | else: 103 | content = f"Question: {content}" 104 | elif role == "assistant": 105 | tool_calls = message.get("tool_calls") 106 | if tool_calls: 107 | func_call = tool_calls[0]["function"] 108 | f_name, f_args = ( 109 | func_call["name"], 110 | func_call["arguments"], 111 | ) 112 | content = f"Thought: I can use {f_name}.\nAction: {f_name}\nAction Input: {f_args}" 113 | elif content: 114 | content = f"Thought: I now know the final answer.\nFinal Answer: {content}" 115 | elif role == "tool": 116 | content = f"Observation: {content}" 117 | if content: 118 | content = content.lstrip("\n").rstrip() 119 | new_messages.append({"role": role, "content": content}) 120 | 121 | return new_messages 122 | 123 | 124 | def eval_qwen_tools_arguments(text: str, tool_names: set[str]): 125 | """ 126 | 解析文本以提取函数名、函数参数和内容。 127 | """ 128 | try: 129 | func_name, func_args, content = "", "", "" 130 | i = text.rfind("\nAction:") 131 | j = text.rfind("\nAction Input:") 132 | k = text.rfind("\nObservation:") 133 | t = max(text.rfind("\nThought:", 0, i), text.rfind("Thought:", 0, i)) 134 | if 0 <= i < j: 135 | if k < j: 136 | text = text.rstrip() + "\nObservation:" 137 | k = text.rfind("\nObservation:") 138 | if 0 <= t < i < j < k: 139 | func_name = text[i + len("\nAction:") : j].strip() 140 | func_args = text[j + len("\nAction Input:") : k].strip() 141 | content = text[t + len("\nThought:") : i].strip() 142 | if func_name in tool_names: 143 | return content, func_name, func_args 144 | except Exception as e: 145 | logger.error("Eval tool calls completion failed:", e) 146 | t = max(text.rfind("\nThought:"), text.rfind("Thought:")) 147 | z = max(text.rfind("\nFinal Answer:"), text.rfind("Final Answer:")) 148 | if z >= 0: 149 | text = text[z + len("\nFinal Answer:") :] 150 | else: 151 | text = text[t + len("\nThought:") :] 152 | return text, None, None 153 | 154 | 155 | def get_tokens_filter(): 156 | found = False 157 | 158 | def process_tokens(tokens: str, delta: str): 159 | nonlocal found 160 | # Once "Final Answer:" is found, future tokens are allowed. 161 | if found: 162 | return delta 163 | # Check if the token ends with "\nFinal Answer:" and update `found`. 164 | final_answer_idx = tokens.lower().rfind("\nfinal answer:") 165 | if final_answer_idx != -1: 166 | found = True 167 | return tokens[final_answer_idx + len("\nfinal answer:") :] 168 | return "" 169 | 170 | return process_tokens 171 | 172 | 173 | @app.post("/v1/chat/completions") 174 | async def proxy_completions(request: ChatCompletionRequest): 175 | logger.info(request) 176 | request.temperature = min(max(request.temperature, 0.1), 2) 177 | tools = request.tools 178 | stream = request.stream 179 | request.messages = process_tools_from_prompt(request.messages, tools) 180 | 181 | body = request.model_dump(exclude_none=True) 182 | tool_names = set() 183 | if tools: 184 | del body["tools"] 185 | tool_names = set(func["function"]["name"] for func in tools) 186 | # FIXME: 有的推理引擎不支持设置 stop 187 | add_stop_words(request, body) 188 | try: 189 | 190 | if stream: 191 | response_stream = await CLIENT.chat.completions.create(**body) 192 | 193 | async def stream_generator(): 194 | previous_text: str = "" 195 | tools_token_filter = get_tokens_filter() 196 | async for i in response_stream: 197 | chunk = i.model_dump(exclude_none=True) 198 | 199 | if tools: 200 | choice = chunk["choices"][0] 201 | delta = choice["delta"] 202 | delta_content = delta.get("content", "") 203 | previous_text += delta_content 204 | if ( 205 | previous_text.endswith("Observation:") 206 | or choice.get("finish_reason") is not None 207 | ): 208 | _, func, args = eval_qwen_tools_arguments( 209 | previous_text, tool_names 210 | ) 211 | delta["content"] = tools_token_filter( 212 | tokens=previous_text, delta=delta_content 213 | ) 214 | if func is not None: 215 | _id = str(uuid.uuid4()) 216 | delta["content"] = None 217 | choice["finish_reason"] = "tool_calls" 218 | delta["tool_calls"] = [ 219 | { 220 | "id": _id, 221 | "function": { 222 | "name": func, 223 | "arguments": args, 224 | }, 225 | "type": "function", 226 | } 227 | ] 228 | yield "data: " + orjson.dumps(chunk).decode() + "\n" 229 | break 230 | else: 231 | # 过滤掉不需要的内容 232 | delta["content"] = tools_token_filter( 233 | tokens=previous_text, delta=delta_content 234 | ) 235 | if not delta["content"]: 236 | continue 237 | 238 | yield "data: " + orjson.dumps(chunk).decode() + "\n" 239 | yield "data: [DONE]\n" 240 | 241 | # 在上下文中返回流式响应 242 | return StreamingResponse(stream_generator(), media_type="text/event-stream") 243 | else: 244 | response = await CLIENT.chat.completions.create(**body) 245 | ret = response.model_dump(exclude_none=True) 246 | 247 | # 处理返回的响应 248 | 249 | if tools: 250 | choice = ret["choices"][0] 251 | text = choice["message"]["content"] 252 | content, func, args = eval_qwen_tools_arguments(text, tool_names) 253 | choice["message"]["content"] = content 254 | if func and args: 255 | _id = str(uuid.uuid4()) 256 | 257 | choice["message"]["tool_calls"] = [ 258 | { 259 | "id": _id, 260 | "function": {"name": func, "arguments": args}, 261 | "type": "function", 262 | } 263 | ] 264 | choice["finish_reason"] = "tool_calls" 265 | return JSONResponse(ret) 266 | 267 | except Exception as e: 268 | # 捕获HTTP异常并返回错误信息 269 | raise HTTPException(status_code=500, detail=str(e)) 270 | 271 | 272 | def add_stop_words(request, body): 273 | stop = request.stop 274 | if isinstance(stop, str): 275 | body["stop"] = [stop, "Observation:"] 276 | elif isinstance(stop, list): 277 | body["stop"] = list(stop) + ["Observation:"] 278 | else: 279 | body["stop"] = "Observation:" 280 | 281 | 282 | if __name__ == "__main__": 283 | import uvicorn 284 | 285 | uvicorn.run(app, host="0.0.0.0", port=8600) 286 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 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 [yyyy] [name of copyright owner] 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. 202 | --------------------------------------------------------------------------------