This pull request includes several changes aimed at improving error handling, adding new functionalities, and refactoring existing code. The changes primarily focus on the AI provider and controller modules.
Error Handling Improvements:
Added checks to ensure the client is initialized before performing operations in multiple functions (PullModel, StopPull, CancelPipeline, RemoveModel, ModelsInstalled) in ai-provider/local/executor.go. [1] [2] [3] [4]
New Functionalities:
Introduced OllamaConfig and OllamaConfigUpdate methods to the ILocalModelController interface and implemented them in controller/ai-local/iml.go. These methods allow for getting and updating the Ollama configuration. [1] [2]
Added functionality to automatically subscribe all applications to new services in the Create method of controller/service/iml.go.
Refactoring:
Refactored the initialization of the Ollama client by replacing the static address with a ResetOllamaAddress function in ai-provider/local/local.go.
Removed unused code and imports, such as the newAIUpstream function and upstream_dto import in controller/service/iml.go. [1] [2]
Codebase Simplification:
Simplified the OnInit method in controller/system/iml.go by consolidating the creation of default entities and adding subscription logic. [1] [2] [3]
Additional Changes:
Added new imports and modules to support the new functionalities and refactoring efforts. [1] [2] [3]
* fix: System Settings - General After changing the interface language, the internal pages do not automatically follow the language switch
* fix: login page language error
APIPark is the world's first open-source enterprise API open platform, helping organizations quickly build internal API portals/marketplaces and enjoy ultimate forwarding performance, API observability, service governance, multi tenant management, subscription approval processes, and many other benefits.
<b>🦄 APIPark is an open-source, all-in-one AI gateway and API developer portal, helping developers and enterprises easily manage, integrate, and deploy AI services. APIPark is open-sourced under the Apache 2.0 license, which means it's free for commercial use!</b>
<br>
# ✨ Quick Start
APIPark is committed to providing one-stop API open and access products for global enterprises, and creating a new generation of API asset governance standards. APIPark is open sourced using the Apache 2.0 protocol.
✨ With APIPark, you can:
1. Quickly connect to 100+ AI models, supporting all mainstream AI Companies!
2. Combine AI models and prompt templates into APIs, such as creating a sentiment analysis API, translation API, or data analysis API based on OpenAI GPT-4 and some custom prompts.
3. Standardize the data format of all AI API requests, so switching AI models or modifying prompts won’t affect your APP or microservices, simplifying your AI usage and maintenance costs.
4. Share APIs within the team through APIPark's developer portal.
5. Manage calling applications and API keys to ensure your API's security and stability.
6. Monitor your AI API usage with clear charts.
7. Quickly export API request logs to third-party logging platforms.
APIPark is committed to addressing several key challenges that enterprises face in API management:
- Complex API call relationships: Simplifies API interactions in complex system architectures.
- Data usage tracking: Provides comprehensive API usage monitoring and reporting.
- Compliance management: Ensure that APIs comply with organizational and regulatory standards.
- Fault detection and troubleshooting: Simplify the identification and resolution of system issues.
- Quantifying the Value of Data Assets: Enhancing the Visibility and Valuation of Data Assets.
<br>
✨ APIPark is also a powerful cloud-native API gateway:
1. It outperforms Nginx with higher performance, supports cluster deployment, and handles large-scale traffic.
2. Share REST APIs within the team, manage API call relationships, and prevent management costs and data breaches caused by chaotic API calls.
<br>
😍 APIPark deployment is very simple, just one command line can deploy your API open platform in 5 minutes.
# 💌 Why Did We Build APIPark?
Before building APIPark, we spent seven years developing an API development and automated testing platform with over 1 million developer users, 500+ enterprise customers, and multi-million-dollar investment from Sequoia Capital.
As AI and Agents evolved, we noticed many enterprises wanted to integrate AI into both internal and third-party APIs, enabling AI agents to perform more complex tasks beyond being just knowledge-based Q&A bots. Hence, we built APIPark—your all-in-one AI gateway and API developer portal to accelerate your AI API development and quickly build your product or AI agent!
<br>
# ✨ Quick Start
APIPark is designed to solve the following problems:
- Seamlessly connect to various AI models and package these AI capabilities into APIs for easy calling, significantly reducing the barrier to using AI models.
- Manage complex AI & API call relationships.
- Manage API creation, monitoring, and security.
- Fault detection and troubleshooting: Simplifying system issue identification and resolution.
- Quantify data asset value: Enhance the visibility and valuation of data assets.
<br>
😍 Deploying APIPark is incredibly simple. With just one command line, you can deploy your AI gateway and API developer portal in under 5 minutes.
API Service Square is one of the core functions of APIPark, aimed at solving the problem of scattered and chaotic management of APIs within enterprises. Through API Service Square, enterprises can display all API services on a unified platform, making it easy for different departments and teams to find and use the required API services.
The API lifecycle management function helps enterprises standardize the API management process, manage API traffic forwarding and load balancing, and manage all API versions released to the public. Improve the quality and maintainability of APIs. Through this feature, enterprises can achieve efficient API development and stable operation, thereby supporting rapid business development and innovation.
The multi tenant management function provides enterprises with the ability to manage multiple tenants on the same platform. Each tenant can have independent resource, user, and permission settings, ensuring the isolation of data and operations, and helping to improve resource utilization efficiency and management convenience.
APIPark provides a process approval function for all API resources to avoid violating regulations or bypassing the platform to call APIs. The caller needs to first apply for API resources and wait for the service provider's approval before officially calling the API.
</td>
</tr>
<tr>
<th>
Logging
</th>
<th>
Analysis
</th>
</tr>
<tr>
<th>
Assist in troubleshooting API access at any given time through detailed call logs
The API call log function provides comprehensive logging capabilities for enterprises, detailing all relevant information of each API call. Through these logs, enterprises can quickly track and troubleshoot issues in API calls, ensuring stable system operation and data security.
By analyzing historical call data, APIPark can display the long-term call trends and performance changes of APIs, helping enterprises to conduct preventive maintenance before problems occur.
- Connect to 100+ major models from all mainstream AI vendors, with standardized API calls requiring no additional adaptation work.
- Combine AI models and prompt templates to create new AI APIs, simplifying AI API development.
- Quickly share AI APIs within the team.
## Enhance Operational Efficiency
- Quickly build an internal API developer portal.
- Efficiently manage and call APIs.
- Reduce complex system call relationships.
## Ensure Compliance and Security
- Powerful service governance and compliance management features.
- Granular permission management for application calls.
- Ensure API call security and compliance, reducing enterprise risk.
## Simplify System Troubleshooting
- Use monitoring and diagnostic tools to quickly identify and resolve issues.
- Reduce downtime and improve system stability.
## Multi-Tenant Management and Flexible Subscription
- Supports multi-tenant management to meet different business unit needs.
- Flexible subscription and approval processes simplify API usage and management.
## Improve API Observability
- Real-time monitoring and tracking of API usage.
- Fully understand data flow to enhance data usage transparency.
<br>
# 🚩 Applicable scenarios
## Improve operational efficiency
- Quickly build an internal API portal.
- Efficient management and API calling.
- Reduce complex inter system call relationships.
# 🚩 Roadmap
We’ve set exciting goals for APIPark: enabling everyone to quickly create their own products and AI agents using AI and APIs!
## Ensure compliance and safety
- Powerful service governance and compliance management capabilities.
- Refine the management of application call permissions.
- Ensure the security and compliance of API calls to reduce enterprise risks.
## Simplify system troubleshooting
- Utilize monitoring and fault diagnosis tools to quickly identify and solve problems.
- Reduce downtime and improve system stability.
## Multi tenant management and flexible subscriptions
- Support multi tenant management to meet the needs of different business units.
- Flexible subscription and approval processes simplify the use and management of APIs.
## Enhance API observability
- Real time monitoring and tracking of API usage.
- Fully grasp the flow of data and enhance the transparency of data usage.
## Enhance the value of data assets
- Quantify and analyze API usage to better evaluate and enhance the value of data assets.
- Provide data support for decision-making.
To achieve this goal, we plan to add new features to APIPark, including:
1. Integrating with API marketplaces such as Postman, RapidAPI, APISpace, APILayer, etc. You can directly use APIs from various API marketplaces through APIPark and make them smarter using AI.
2. Integrating AI Agents such as Langchain, AgentGPT, Auto-GPT, Dify, and more, allowing AI Agents to access your internal or third-party APIs through APIPark to complete more complex tasks.
3. Intelligent API orchestration: APIPark will provide a unified API entry point and automatically orchestrate multiple APIs to fulfill your requests based on the API content.
<br>
# 🚀 One click deployment
APIPark deployment is very simple, just one command line can deploy your API asset open platform in 5 minutes.
Visit [APIPark Documentation](https://docs.apipark.com/docs/deploy) for detailed installation guides, API references, and usage instructions.
<br>
## 📕 file
Visit [APIPark Document]( https://docs.apipark.com/docs/install )Get detailed installation guides, API references, and usage instructions.
# 🧾 License
APIPark uses the Apache 2.0 License. For more details, please refer to the LICENSE file.
<br>
## 🧾 licence
APIPark uses the Apache 2.0 license. For more details, please refer to the LICENSE document.
<br>
## 💌 contact us
For enterprise level functionality and professional technical support, please contact pre-sales experts for personalized demonstrations, customized solutions, and pricing.
# 💌 Contact Us
For enterprise-level features and professional technical support, contact our pre-sales experts for personalized demos, customized solutions, and pricing.
- Website: https://apipark.com
- Email: dev@apipark.com
- Email: contact@apipark.com
<br>
Thank you for choosing APIPark, the next-generation API Open platform.
🙏 A big thanks to everyone who helped shape APIPark. We are thrilled to hear the community’s thoughts! Let’s make the world of APIs and AI stronger and more fun together. 🎉
en_US:The amount of randomness injected into the response.
- name:top_p
required:false
type:float
default:0.999
min:0.000
max:1.000
help:
zh_Hans:在核采样中,Anthropic Claude 按概率递减顺序计算每个后续标记的所有选项的累积分布,并在达到 top_p 指定的特定概率时将其切断。您应该更改温度或top_p,但不能同时更改两者。
en_US:In nucleus sampling, Anthropic Claude computes the cumulative distribution over all the options for each subsequent token in decreasing probability order and cuts it off once it reaches a particular probability specified by top_p. You should alter either temperature or top_p, but not both.
- name:top_k
required:false
type:int
default:0
min:0
# tip docs from aws has error, max value is 500
max:500
help:
zh_Hans:对于每个后续标记,仅从前 K 个选项中进行采样。使用 top_k 删除长尾低概率响应。
en_US:Only sample from the top K options for each subsequent token. Use top_k to remove long tail low probability responses.
en_US:The amount of randomness injected into the response.
- name:top_p
required:false
type:float
default:0.999
min:0.000
max:1.000
help:
zh_Hans:在核采样中,Anthropic Claude 按概率递减顺序计算每个后续标记的所有选项的累积分布,并在达到 top_p 指定的特定概率时将其切断。您应该更改温度或top_p,但不能同时更改两者。
en_US:In nucleus sampling, Anthropic Claude computes the cumulative distribution over all the options for each subsequent token in decreasing probability order and cuts it off once it reaches a particular probability specified by top_p. You should alter either temperature or top_p, but not both.
- name:top_k
required:false
type:int
default:0
min:0
# tip docs from aws has error, max value is 500
max:500
help:
zh_Hans:对于每个后续标记,仅从前 K 个选项中进行采样。使用 top_k 删除长尾低概率响应。
en_US:Only sample from the top K options for each subsequent token. Use top_k to remove long tail low probability responses.
en_US:The amount of randomness injected into the response.
- name:top_p
required:false
type:float
default:0.999
min:0.000
max:1.000
help:
zh_Hans:在核采样中,Anthropic Claude 按概率递减顺序计算每个后续标记的所有选项的累积分布,并在达到 top_p 指定的特定概率时将其切断。您应该更改温度或top_p,但不能同时更改两者。
en_US:In nucleus sampling, Anthropic Claude computes the cumulative distribution over all the options for each subsequent token in decreasing probability order and cuts it off once it reaches a particular probability specified by top_p. You should alter either temperature or top_p, but not both.
- name:top_k
required:false
type:int
default:0
min:0
# tip docs from aws has error, max value is 500
max:500
help:
zh_Hans:对于每个后续标记,仅从前 K 个选项中进行采样。使用 top_k 删除长尾低概率响应。
en_US:Only sample from the top K options for each subsequent token. Use top_k to remove long tail low probability responses.
zh_Hans:停止前生成的最大令牌数。请注意,Anthropic Claude 模型可能会在达到 max_tokens 的值之前停止生成令牌。不同的 Anthropic Claude 模型对此参数具有不同的最大值。
en_US:The maximum number of tokens to generate before stopping. Note that Anthropic Claude models might stop generating tokens before reaching the value of max_tokens. Different Anthropic Claude models have different maximum values for this parameter.
en_US:The amount of randomness injected into the response.
- name:top_p
required:false
type:float
default:0.999
min:0.000
max:1.000
help:
zh_Hans:在核采样中,Anthropic Claude 按概率递减顺序计算每个后续标记的所有选项的累积分布,并在达到 top_p 指定的特定概率时将其切断。您应该更改温度或top_p,但不能同时更改两者。
en_US:In nucleus sampling, Anthropic Claude computes the cumulative distribution over all the options for each subsequent token in decreasing probability order and cuts it off once it reaches a particular probability specified by top_p. You should alter either temperature or top_p, but not both.
- name:top_k
required:false
type:int
default:0
min:0
# tip docs from aws has error, max value is 500
max:500
help:
zh_Hans:对于每个后续标记,仅从前 K 个选项中进行采样。使用 top_k 删除长尾低概率响应。
en_US:Only sample from the top K options for each subsequent token. Use top_k to remove long tail low probability responses.
zh_Hans:停止前生成的最大令牌数。请注意,Anthropic Claude 模型可能会在达到 max_tokens 的值之前停止生成令牌。不同的 Anthropic Claude 模型对此参数具有不同的最大值。
en_US:The maximum number of tokens to generate before stopping. Note that Anthropic Claude models might stop generating tokens before reaching the value of max_tokens. Different Anthropic Claude models have different maximum values for this parameter.
en_US:The amount of randomness injected into the response.
- name:top_p
required:false
type:float
default:0.999
min:0.000
max:1.000
help:
zh_Hans:在核采样中,Anthropic Claude 按概率递减顺序计算每个后续标记的所有选项的累积分布,并在达到 top_p 指定的特定概率时将其切断。您应该更改温度或top_p,但不能同时更改两者。
en_US:In nucleus sampling, Anthropic Claude computes the cumulative distribution over all the options for each subsequent token in decreasing probability order and cuts it off once it reaches a particular probability specified by top_p. You should alter either temperature or top_p, but not both.
- name:top_k
required:false
type:int
default:0
min:0
# tip docs from aws has error, max value is 500
max:500
help:
zh_Hans:对于每个后续标记,仅从前 K 个选项中进行采样。使用 top_k 删除长尾低概率响应。
en_US:Only sample from the top K options for each subsequent token. Use top_k to remove long tail low probability responses.
zh_Hans:停止前生成的最大令牌数。请注意,Anthropic Claude 模型可能会在达到 max_tokens 的值之前停止生成令牌。不同的 Anthropic Claude 模型对此参数具有不同的最大值。
en_US:The maximum number of tokens to generate before stopping. Note that Anthropic Claude models might stop generating tokens before reaching the value of max_tokens. Different Anthropic Claude models have different maximum values for this parameter.
en_US:The amount of randomness injected into the response.
- name:top_p
required:false
type:float
default:0.999
min:0.000
max:1.000
help:
zh_Hans:在核采样中,Anthropic Claude 按概率递减顺序计算每个后续标记的所有选项的累积分布,并在达到 top_p 指定的特定概率时将其切断。您应该更改温度或top_p,但不能同时更改两者。
en_US:In nucleus sampling, Anthropic Claude computes the cumulative distribution over all the options for each subsequent token in decreasing probability order and cuts it off once it reaches a particular probability specified by top_p. You should alter either temperature or top_p, but not both.
- name:top_k
required:false
type:int
default:0
min:0
# tip docs from aws has error, max value is 500
max:500
help:
zh_Hans:对于每个后续标记,仅从前 K 个选项中进行采样。使用 top_k 删除长尾低概率响应。
en_US:Only sample from the top K options for each subsequent token. Use top_k to remove long tail low probability responses.
zh_Hans:停止前生成的最大令牌数。请注意,Anthropic Claude 模型可能会在达到 max_tokens 的值之前停止生成令牌。不同的 Anthropic Claude 模型对此参数具有不同的最大值。
en_US:The maximum number of tokens to generate before stopping. Note that Anthropic Claude models might stop generating tokens before reaching the value of max_tokens. Different Anthropic Claude models have different maximum values for this parameter.
- name:temperature
use_template:temperature
required:false
type:float
default:1
min:0.0
max:1.0
help:
zh_Hans:生成内容的随机性。
en_US:The amount of randomness injected into the response.
- name:top_p
required:false
type:float
default:0.999
min:0.000
max:1.000
help:
zh_Hans:在核采样中,Anthropic Claude 按概率递减顺序计算每个后续标记的所有选项的累积分布,并在达到 top_p 指定的特定概率时将其切断。您应该更改温度或top_p,但不能同时更改两者。
en_US:In nucleus sampling, Anthropic Claude computes the cumulative distribution over all the options for each subsequent token in decreasing probability order and cuts it off once it reaches a particular probability specified by top_p. You should alter either temperature or top_p, but not both.
- name:top_k
required:false
type:int
default:0
min:0
# tip docs from aws has error, max value is 500
max:500
help:
zh_Hans:对于每个后续标记,仅从前 K 个选项中进行采样。使用 top_k 删除长尾低概率响应。
en_US:Only sample from the top K options for each subsequent token. Use top_k to remove long tail low probability responses.
zh_Hans:停止前生成的最大令牌数。请注意,Anthropic Claude 模型可能会在达到 max_tokens 的值之前停止生成令牌。不同的 Anthropic Claude 模型对此参数具有不同的最大值。
en_US:The maximum number of tokens to generate before stopping. Note that Anthropic Claude models might stop generating tokens before reaching the value of max_tokens. Different Anthropic Claude models have different maximum values for this parameter.
- name:temperature
use_template:temperature
required:false
type:float
default:1
min:0.0
max:1.0
help:
zh_Hans:生成内容的随机性。
en_US:The amount of randomness injected into the response.
- name:top_p
required:false
type:float
default:0.999
min:0.000
max:1.000
help:
zh_Hans:在核采样中,Anthropic Claude 按概率递减顺序计算每个后续标记的所有选项的累积分布,并在达到 top_p 指定的特定概率时将其切断。您应该更改温度或top_p,但不能同时更改两者。
en_US:In nucleus sampling, Anthropic Claude computes the cumulative distribution over all the options for each subsequent token in decreasing probability order and cuts it off once it reaches a particular probability specified by top_p. You should alter either temperature or top_p, but not both.
- name:top_k
required:false
type:int
default:0
min:0
# tip docs from aws has error, max value is 500
max:500
help:
zh_Hans:对于每个后续标记,仅从前 K 个选项中进行采样。使用 top_k 删除长尾低概率响应。
en_US:Only sample from the top K options for each subsequent token. Use top_k to remove long tail low probability responses.
zh_Hans:停止前生成的最大令牌数。请注意,Anthropic Claude 模型可能会在达到 max_tokens 的值之前停止生成令牌。不同的 Anthropic Claude 模型对此参数具有不同的最大值。
en_US:The maximum number of tokens to generate before stopping. Note that Anthropic Claude models might stop generating tokens before reaching the value of max_tokens. Different Anthropic Claude models have different maximum values for this parameter.
- name:temperature
use_template:temperature
required:false
type:float
default:1
min:0.0
max:1.0
help:
zh_Hans:生成内容的随机性。
en_US:The amount of randomness injected into the response.
- name:top_p
required:false
type:float
default:0.999
min:0.000
max:1.000
help:
zh_Hans:在核采样中,Anthropic Claude 按概率递减顺序计算每个后续标记的所有选项的累积分布,并在达到 top_p 指定的特定概率时将其切断。您应该更改温度或top_p,但不能同时更改两者。
en_US:In nucleus sampling, Anthropic Claude computes the cumulative distribution over all the options for each subsequent token in decreasing probability order and cuts it off once it reaches a particular probability specified by top_p. You should alter either temperature or top_p, but not both.
- name:top_k
required:false
type:int
default:0
min:0
# tip docs from aws has error, max value is 500
max:500
help:
zh_Hans:对于每个后续标记,仅从前 K 个选项中进行采样。使用 top_k 删除长尾低概率响应。
en_US:Only sample from the top K options for each subsequent token. Use top_k to remove long tail low probability responses.
zh_Hans:停止前生成的最大令牌数。请注意,Anthropic Claude 模型可能会在达到 max_tokens 的值之前停止生成令牌。不同的 Anthropic Claude 模型对此参数具有不同的最大值。
en_US:The maximum number of tokens to generate before stopping. Note that Anthropic Claude models might stop generating tokens before reaching the value of max_tokens. Different Anthropic Claude models have different maximum values for this parameter.
- name:temperature
use_template:temperature
required:false
type:float
default:1
min:0.0
max:1.0
help:
zh_Hans:生成内容的随机性。
en_US:The amount of randomness injected into the response.
- name:top_p
required:false
type:float
default:0.999
min:0.000
max:1.000
help:
zh_Hans:在核采样中,Anthropic Claude 按概率递减顺序计算每个后续标记的所有选项的累积分布,并在达到 top_p 指定的特定概率时将其切断。您应该更改温度或top_p,但不能同时更改两者。
en_US:In nucleus sampling, Anthropic Claude computes the cumulative distribution over all the options for each subsequent token in decreasing probability order and cuts it off once it reaches a particular probability specified by top_p. You should alter either temperature or top_p, but not both.
- name:top_k
required:false
type:int
default:0
min:0
# tip docs from aws has error, max value is 500
max:500
help:
zh_Hans:对于每个后续标记,仅从前 K 个选项中进行采样。使用 top_k 删除长尾低概率响应。
en_US:Only sample from the top K options for each subsequent token. Use top_k to remove long tail low probability responses.
zh_Hans:停止前生成的最大令牌数。请注意,Anthropic Claude 模型可能会在达到 max_tokens 的值之前停止生成令牌。不同的 Anthropic Claude 模型对此参数具有不同的最大值。
en_US:The maximum number of tokens to generate before stopping. Note that Anthropic Claude models might stop generating tokens before reaching the value of max_tokens. Different Anthropic Claude models have different maximum values for this parameter.
- name:temperature
use_template:temperature
required:false
type:float
default:1
min:0.0
max:1.0
help:
zh_Hans:生成内容的随机性。
en_US:The amount of randomness injected into the response.
- name:top_p
required:false
type:float
default:0.999
min:0.000
max:1.000
help:
zh_Hans:在核采样中,Anthropic Claude 按概率递减顺序计算每个后续标记的所有选项的累积分布,并在达到 top_p 指定的特定概率时将其切断。您应该更改温度或top_p,但不能同时更改两者。
en_US:In nucleus sampling, Anthropic Claude computes the cumulative distribution over all the options for each subsequent token in decreasing probability order and cuts it off once it reaches a particular probability specified by top_p. You should alter either temperature or top_p, but not both.
- name:top_k
required:false
type:int
default:0
min:0
# tip docs from aws has error, max value is 500
max:500
help:
zh_Hans:对于每个后续标记,仅从前 K 个选项中进行采样。使用 top_k 删除长尾低概率响应。
en_US:Only sample from the top K options for each subsequent token. Use top_k to remove long tail low probability responses.
zh_Hans:停止前生成的最大令牌数。请注意,Anthropic Claude 模型可能会在达到 max_tokens 的值之前停止生成令牌。不同的 Anthropic Claude 模型对此参数具有不同的最大值。
en_US:The maximum number of tokens to generate before stopping. Note that Anthropic Claude models might stop generating tokens before reaching the value of max_tokens. Different Anthropic Claude models have different maximum values for this parameter.
- name:temperature
use_template:temperature
required:false
type:float
default:1
min:0.0
max:1.0
help:
zh_Hans:生成内容的随机性。
en_US:The amount of randomness injected into the response.
- name:top_p
required:false
type:float
default:0.999
min:0.000
max:1.000
help:
zh_Hans:在核采样中,Anthropic Claude 按概率递减顺序计算每个后续标记的所有选项的累积分布,并在达到 top_p 指定的特定概率时将其切断。您应该更改温度或top_p,但不能同时更改两者。
en_US:In nucleus sampling, Anthropic Claude computes the cumulative distribution over all the options for each subsequent token in decreasing probability order and cuts it off once it reaches a particular probability specified by top_p. You should alter either temperature or top_p, but not both.
- name:top_k
required:false
type:int
default:0
min:0
# tip docs from aws has error, max value is 500
max:500
help:
zh_Hans:对于每个后续标记,仅从前 K 个选项中进行采样。使用 top_k 删除长尾低概率响应。
en_US:Only sample from the top K options for each subsequent token. Use top_k to remove long tail low probability responses.
zh_Hans:停止前生成的最大令牌数。请注意,Anthropic Claude 模型可能会在达到 max_tokens 的值之前停止生成令牌。不同的 Anthropic Claude 模型对此参数具有不同的最大值。
en_US:The maximum number of tokens to generate before stopping. Note that Anthropic Claude models might stop generating tokens before reaching the value of max_tokens. Different Anthropic Claude models have different maximum values for this parameter.
- name:temperature
use_template:temperature
required:false
type:float
default:1
min:0.0
max:1.0
help:
zh_Hans:生成内容的随机性。
en_US:The amount of randomness injected into the response.
- name:top_p
required:false
type:float
default:0.999
min:0.000
max:1.000
help:
zh_Hans:在核采样中,Anthropic Claude 按概率递减顺序计算每个后续标记的所有选项的累积分布,并在达到 top_p 指定的特定概率时将其切断。您应该更改温度或top_p,但不能同时更改两者。
en_US:In nucleus sampling, Anthropic Claude computes the cumulative distribution over all the options for each subsequent token in decreasing probability order and cuts it off once it reaches a particular probability specified by top_p. You should alter either temperature or top_p, but not both.
- name:top_k
required:false
type:int
default:0
min:0
# tip docs from aws has error, max value is 500
max:500
help:
zh_Hans:对于每个后续标记,仅从前 K 个选项中进行采样。使用 top_k 删除长尾低概率响应。
en_US:Only sample from the top K options for each subsequent token. Use top_k to remove long tail low probability responses.
zh_Hans:停止前生成的最大令牌数。请注意,Anthropic Claude 模型可能会在达到 max_tokens 的值之前停止生成令牌。不同的 Anthropic Claude 模型对此参数具有不同的最大值。
en_US:The maximum number of tokens to generate before stopping. Note that Anthropic Claude models might stop generating tokens before reaching the value of max_tokens. Different Anthropic Claude models have different maximum values for this parameter.
en_US:The amount of randomness injected into the response.
- name:top_p
required:false
type:float
default:0.999
min:0.000
max:1.000
help:
zh_Hans:在核采样中,Anthropic Claude 按概率递减顺序计算每个后续标记的所有选项的累积分布,并在达到 top_p 指定的特定概率时将其切断。您应该更改温度或top_p,但不能同时更改两者。
en_US:In nucleus sampling, Anthropic Claude computes the cumulative distribution over all the options for each subsequent token in decreasing probability order and cuts it off once it reaches a particular probability specified by top_p. You should alter either temperature or top_p, but not both.
- name:top_k
required:false
type:int
default:0
min:0
# tip docs from aws has error, max value is 500
max:500
help:
zh_Hans:对于每个后续标记,仅从前 K 个选项中进行采样。使用 top_k 删除长尾低概率响应。
en_US:Only sample from the top K options for each subsequent token. Use top_k to remove long tail low probability responses.
zh_Hans:停止前生成的最大令牌数。请注意,Anthropic Claude 模型可能会在达到 max_tokens 的值之前停止生成令牌。不同的 Anthropic Claude 模型对此参数具有不同的最大值。
en_US:The maximum number of tokens to generate before stopping. Note that Anthropic Claude models might stop generating tokens before reaching the value of max_tokens. Different Anthropic Claude models have different maximum values for this parameter.
- name:temperature
use_template:temperature
required:false
type:float
default:1
min:0.0
max:1.0
help:
zh_Hans:生成内容的随机性。
en_US:The amount of randomness injected into the response.
- name:top_p
required:false
type:float
default:0.999
min:0.000
max:1.000
help:
zh_Hans:在核采样中,Anthropic Claude 按概率递减顺序计算每个后续标记的所有选项的累积分布,并在达到 top_p 指定的特定概率时将其切断。您应该更改温度或top_p,但不能同时更改两者。
en_US:In nucleus sampling, Anthropic Claude computes the cumulative distribution over all the options for each subsequent token in decreasing probability order and cuts it off once it reaches a particular probability specified by top_p. You should alter either temperature or top_p, but not both.
- name:top_k
required:false
type:int
default:0
min:0
# tip docs from aws has error, max value is 500
max:500
help:
zh_Hans:对于每个后续标记,仅从前 K 个选项中进行采样。使用 top_k 删除长尾低概率响应。
en_US:Only sample from the top K options for each subsequent token. Use top_k to remove long tail low probability responses.
zh_Hans:停止前生成的最大令牌数。请注意,Anthropic Claude 模型可能会在达到 max_tokens 的值之前停止生成令牌。不同的 Anthropic Claude 模型对此参数具有不同的最大值。
en_US:The maximum number of tokens to generate before stopping. Note that Anthropic Claude models might stop generating tokens before reaching the value of max_tokens. Different Anthropic Claude models have different maximum values for this parameter.
- name:temperature
use_template:temperature
required:false
type:float
default:1
min:0.0
max:1.0
help:
zh_Hans:生成内容的随机性。
en_US:The amount of randomness injected into the response.
- name:top_p
required:false
type:float
default:0.999
min:0.000
max:1.000
help:
zh_Hans:在核采样中,Anthropic Claude 按概率递减顺序计算每个后续标记的所有选项的累积分布,并在达到 top_p 指定的特定概率时将其切断。您应该更改温度或top_p,但不能同时更改两者。
en_US:In nucleus sampling, Anthropic Claude computes the cumulative distribution over all the options for each subsequent token in decreasing probability order and cuts it off once it reaches a particular probability specified by top_p. You should alter either temperature or top_p, but not both.
- name:top_k
required:false
type:int
default:0
min:0
# tip docs from aws has error, max value is 500
max:500
help:
zh_Hans:对于每个后续标记,仅从前 K 个选项中进行采样。使用 top_k 删除长尾低概率响应。
en_US:Only sample from the top K options for each subsequent token. Use top_k to remove long tail low probability responses.
zh_Hans:停止前生成的最大令牌数。请注意,Anthropic Claude 模型可能会在达到 max_tokens 的值之前停止生成令牌。不同的 Anthropic Claude 模型对此参数具有不同的最大值。
en_US:The maximum number of tokens to generate before stopping. Note that Anthropic Claude models might stop generating tokens before reaching the value of max_tokens. Different Anthropic Claude models have different maximum values for this parameter.
- name:temperature
use_template:temperature
required:false
type:float
default:1
min:0.0
max:1.0
help:
zh_Hans:生成内容的随机性。
en_US:The amount of randomness injected into the response.
- name:top_p
required:false
type:float
default:0.999
min:0.000
max:1.000
help:
zh_Hans:在核采样中,Anthropic Claude 按概率递减顺序计算每个后续标记的所有选项的累积分布,并在达到 top_p 指定的特定概率时将其切断。您应该更改温度或top_p,但不能同时更改两者。
en_US:In nucleus sampling, Anthropic Claude computes the cumulative distribution over all the options for each subsequent token in decreasing probability order and cuts it off once it reaches a particular probability specified by top_p. You should alter either temperature or top_p, but not both.
- name:top_k
required:false
type:int
default:0
min:0
# tip docs from aws has error, max value is 500
max:500
help:
zh_Hans:对于每个后续标记,仅从前 K 个选项中进行采样。使用 top_k 删除长尾低概率响应。
en_US:Only sample from the top K options for each subsequent token. Use top_k to remove long tail low probability responses.
en_US:The amount of randomness injected into the response.
- name:top_p
required:false
type:float
default:0.999
min:0.000
max:1.000
help:
zh_Hans:在核采样中,Anthropic Claude 按概率递减顺序计算每个后续标记的所有选项的累积分布,并在达到 top_p 指定的特定概率时将其切断。您应该更改温度或top_p,但不能同时更改两者。
en_US:In nucleus sampling, Anthropic Claude computes the cumulative distribution over all the options for each subsequent token in decreasing probability order and cuts it off once it reaches a particular probability specified by top_p. You should alter either temperature or top_p, but not both.
- name:top_k
required:false
type:int
default:0
min:0
# tip docs from aws has error, max value is 500
max:500
help:
zh_Hans:对于每个后续标记,仅从前 K 个选项中进行采样。使用 top_k 删除长尾低概率响应。
en_US:Only sample from the top K options for each subsequent token. Use top_k to remove long tail low probability responses.
en_US:The amount of randomness injected into the response.
- name:top_p
required:false
type:float
default:0.999
min:0.000
max:1.000
help:
zh_Hans:在核采样中,Anthropic Claude 按概率递减顺序计算每个后续标记的所有选项的累积分布,并在达到 top_p 指定的特定概率时将其切断。您应该更改温度或top_p,但不能同时更改两者。
en_US:In nucleus sampling, Anthropic Claude computes the cumulative distribution over all the options for each subsequent token in decreasing probability order and cuts it off once it reaches a particular probability specified by top_p. You should alter either temperature or top_p, but not both.
- name:top_k
required:false
type:int
default:0
min:0
# tip docs from aws has error, max value is 500
max:500
help:
zh_Hans:对于每个后续标记,仅从前 K 个选项中进行采样。使用 top_k 删除长尾低概率响应。
en_US:Only sample from the top K options for each subsequent token. Use top_k to remove long tail low probability responses.
en_US:The amount of randomness injected into the response.
- name:top_p
required:false
type:float
default:0.999
min:0.000
max:1.000
help:
zh_Hans:在核采样中,Anthropic Claude 按概率递减顺序计算每个后续标记的所有选项的累积分布,并在达到 top_p 指定的特定概率时将其切断。您应该更改温度或top_p,但不能同时更改两者。
en_US:In nucleus sampling, Anthropic Claude computes the cumulative distribution over all the options for each subsequent token in decreasing probability order and cuts it off once it reaches a particular probability specified by top_p. You should alter either temperature or top_p, but not both.
- name:top_k
required:false
type:int
default:0
min:0
# tip docs from aws has error, max value is 500
max:500
help:
zh_Hans:对于每个后续标记,仅从前 K 个选项中进行采样。使用 top_k 删除长尾低概率响应。
en_US:Only sample from the top K options for each subsequent token. Use top_k to remove long tail low probability responses.
zh_Hans:停止前生成的最大令牌数。请注意,Anthropic Claude 模型可能会在达到 max_tokens 的值之前停止生成令牌。不同的 Anthropic Claude 模型对此参数具有不同的最大值。
en_US:The maximum number of tokens to generate before stopping. Note that Anthropic Claude models might stop generating tokens before reaching the value of max_tokens. Different Anthropic Claude models have different maximum values for this parameter.
en_US:The amount of randomness injected into the response.
- name:top_p
required:false
type:float
default:0.999
min:0.000
max:1.000
help:
zh_Hans:在核采样中,Anthropic Claude 按概率递减顺序计算每个后续标记的所有选项的累积分布,并在达到 top_p 指定的特定概率时将其切断。您应该更改温度或top_p,但不能同时更改两者。
en_US:In nucleus sampling, Anthropic Claude computes the cumulative distribution over all the options for each subsequent token in decreasing probability order and cuts it off once it reaches a particular probability specified by top_p. You should alter either temperature or top_p, but not both.
- name:top_k
required:false
type:int
default:0
min:0
# tip docs from aws has error, max value is 500
max:500
help:
zh_Hans:对于每个后续标记,仅从前 K 个选项中进行采样。使用 top_k 删除长尾低概率响应。
en_US:Only sample from the top K options for each subsequent token. Use top_k to remove long tail low probability responses.
zh_Hans:停止前生成的最大令牌数。请注意,Anthropic Claude 模型可能会在达到 max_tokens 的值之前停止生成令牌。不同的 Anthropic Claude 模型对此参数具有不同的最大值。
en_US:The maximum number of tokens to generate before stopping. Note that Anthropic Claude models might stop generating tokens before reaching the value of max_tokens. Different Anthropic Claude models have different maximum values for this parameter.
en_US:The amount of randomness injected into the response.
- name:top_p
required:false
type:float
default:0.999
min:0.000
max:1.000
help:
zh_Hans:在核采样中,Anthropic Claude 按概率递减顺序计算每个后续标记的所有选项的累积分布,并在达到 top_p 指定的特定概率时将其切断。您应该更改温度或top_p,但不能同时更改两者。
en_US:In nucleus sampling, Anthropic Claude computes the cumulative distribution over all the options for each subsequent token in decreasing probability order and cuts it off once it reaches a particular probability specified by top_p. You should alter either temperature or top_p, but not both.
- name:top_k
required:false
type:int
default:0
min:0
# tip docs from aws has error, max value is 500
max:500
help:
zh_Hans:对于每个后续标记,仅从前 K 个选项中进行采样。使用 top_k 删除长尾低概率响应。
en_US:Only sample from the top K options for each subsequent token. Use top_k to remove long tail low probability responses.
zh_Hans:停止前生成的最大令牌数。请注意,Anthropic Claude 模型可能会在达到 max_tokens 的值之前停止生成令牌。不同的 Anthropic Claude 模型对此参数具有不同的最大值。
en_US:The maximum number of tokens to generate before stopping. Note that Anthropic Claude models might stop generating tokens before reaching the value of max_tokens. Different Anthropic Claude models have different maximum values for this parameter.
en_US:The amount of randomness injected into the response.
- name:top_p
required:false
type:float
default:0.999
min:0.000
max:1.000
help:
zh_Hans:在核采样中,Anthropic Claude 按概率递减顺序计算每个后续标记的所有选项的累积分布,并在达到 top_p 指定的特定概率时将其切断。您应该更改温度或top_p,但不能同时更改两者。
en_US:In nucleus sampling, Anthropic Claude computes the cumulative distribution over all the options for each subsequent token in decreasing probability order and cuts it off once it reaches a particular probability specified by top_p. You should alter either temperature or top_p, but not both.
- name:top_k
required:false
type:int
default:0
min:0
# tip docs from aws has error, max value is 500
max:500
help:
zh_Hans:对于每个后续标记,仅从前 K 个选项中进行采样。使用 top_k 删除长尾低概率响应。
en_US:Only sample from the top K options for each subsequent token. Use top_k to remove long tail low probability responses.
zh_Hans:停止前生成的最大令牌数。请注意,Anthropic Claude 模型可能会在达到 max_tokens 的值之前停止生成令牌。不同的 Anthropic Claude 模型对此参数具有不同的最大值。
en_US:The maximum number of tokens to generate before stopping. Note that Anthropic Claude models might stop generating tokens before reaching the value of max_tokens. Different Anthropic Claude models have different maximum values for this parameter.
- name:temperature
use_template:temperature
required:false
type:float
default:1
min:0.0
max:1.0
help:
zh_Hans:生成内容的随机性。
en_US:The amount of randomness injected into the response.
- name:top_p
required:false
type:float
default:0.999
min:0.000
max:1.000
help:
zh_Hans:在核采样中,Anthropic Claude 按概率递减顺序计算每个后续标记的所有选项的累积分布,并在达到 top_p 指定的特定概率时将其切断。您应该更改温度或top_p,但不能同时更改两者。
en_US:In nucleus sampling, Anthropic Claude computes the cumulative distribution over all the options for each subsequent token in decreasing probability order and cuts it off once it reaches a particular probability specified by top_p. You should alter either temperature or top_p, but not both.
- name:top_k
required:false
type:int
default:0
min:0
# tip docs from aws has error, max value is 500
max:500
help:
zh_Hans:对于每个后续标记,仅从前 K 个选项中进行采样。使用 top_k 删除长尾低概率响应。
en_US:Only sample from the top K options for each subsequent token. Use top_k to remove long tail low probability responses.
zh_Hans:停止前生成的最大令牌数。请注意,Anthropic Claude 模型可能会在达到 max_tokens 的值之前停止生成令牌。不同的 Anthropic Claude 模型对此参数具有不同的最大值。
en_US:The maximum number of tokens to generate before stopping. Note that Anthropic Claude models might stop generating tokens before reaching the value of max_tokens. Different Anthropic Claude models have different maximum values for this parameter.
- name:temperature
use_template:temperature
required:false
type:float
default:1
min:0.0
max:1.0
help:
zh_Hans:生成内容的随机性。
en_US:The amount of randomness injected into the response.
- name:top_p
required:false
type:float
default:0.999
min:0.000
max:1.000
help:
zh_Hans:在核采样中,Anthropic Claude 按概率递减顺序计算每个后续标记的所有选项的累积分布,并在达到 top_p 指定的特定概率时将其切断。您应该更改温度或top_p,但不能同时更改两者。
en_US:In nucleus sampling, Anthropic Claude computes the cumulative distribution over all the options for each subsequent token in decreasing probability order and cuts it off once it reaches a particular probability specified by top_p. You should alter either temperature or top_p, but not both.
- name:top_k
required:false
type:int
default:0
min:0
# tip docs from aws has error, max value is 500
max:500
help:
zh_Hans:对于每个后续标记,仅从前 K 个选项中进行采样。使用 top_k 删除长尾低概率响应。
en_US:Only sample from the top K options for each subsequent token. Use top_k to remove long tail low probability responses.
zh_Hans:停止前生成的最大令牌数。请注意,Anthropic Claude 模型可能会在达到 max_tokens 的值之前停止生成令牌。不同的 Anthropic Claude 模型对此参数具有不同的最大值。
en_US:The maximum number of tokens to generate before stopping. Note that Anthropic Claude models might stop generating tokens before reaching the value of max_tokens. Different Anthropic Claude models have different maximum values for this parameter.
- name:temperature
use_template:temperature
required:false
type:float
default:1
min:0.0
max:1.0
help:
zh_Hans:生成内容的随机性。
en_US:The amount of randomness injected into the response.
- name:top_p
required:false
type:float
default:0.999
min:0.000
max:1.000
help:
zh_Hans:在核采样中,Anthropic Claude 按概率递减顺序计算每个后续标记的所有选项的累积分布,并在达到 top_p 指定的特定概率时将其切断。您应该更改温度或top_p,但不能同时更改两者。
en_US:In nucleus sampling, Anthropic Claude computes the cumulative distribution over all the options for each subsequent token in decreasing probability order and cuts it off once it reaches a particular probability specified by top_p. You should alter either temperature or top_p, but not both.
- name:top_k
required:false
type:int
default:0
min:0
# tip docs from aws has error, max value is 500
max:500
help:
zh_Hans:对于每个后续标记,仅从前 K 个选项中进行采样。使用 top_k 删除长尾低概率响应。
en_US:Only sample from the top K options for each subsequent token. Use top_k to remove long tail low probability responses.
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.