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 是全球首个开源企业级 API 开放平台,帮助组织快速构建企业内部 API 门户/市场,享受极致的转发性能、API 可观测性、服务治理、多租户管理、订阅审批流程等诸多好处。
<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>
# ✨ 快速开始
APIPark 致力于为全球企业提供一站式 API 开放与接入产品,打造新一代 API 资产治理标准。APIPark 使用 Apache 2.0 协议开源。
✨ 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 致力于解决企业在 API 管理中面临的几大关键挑战:
- 复杂的 API 调用关系:简化了复杂系统架构中的 API 交互。
- 数据使用跟踪:提供全面的 API 使用监控和报告。
- 合规管理:确保 API 符合组织和法规标准。
- 故障检测和排查:简化系统问题的识别和解决。
- 量化数据资产价值:提升数据资产的可见性和估值。
<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 部署非常简单,仅需一句命令行即可在 5 分钟内部署好你的 API 资产开放平台。
# 💌 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.
通过对历史调用数据的分析,APIPark 能够展示 API 长期的调用趋势和性能变化,帮助企业在问题发生前进行预防性维护。
</td>
</tr>
</table>
<br>
# 🚀 Use Cases
## Simplify AI Integration Costs
- 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>
# 🚩适用场景
## 提升运营效率
- 快速构建内部 API 门户。
- 高效管理和调用 API。
- 减少复杂的系统间调用关系。
# 🚩 Roadmap
We’ve set exciting goals for APIPark: enabling everyone to quickly create their own products and AI agents using AI and APIs!
## 确保合规与安全
- 强大的服务治理和合规管理功能。
- 精细化管理应用调用的权限。
- 确保 API 调用的安全性和合规性,降低企业风险。
## 简化系统故障排查
- 利用监控和故障诊断工具快速发现和解决问题。
- 减少停机时间,提高系统稳定性。
## 多租户管理和灵活订阅
- 支持多租户管理,满足不同业务单元需求。
- 灵活的订阅和审批流程简化 API 的使用和管理。
## 增强 API 可观测性
- 实时监控和追踪 API 使用情况。
- 全面掌握数据流动,提升数据使用透明度。
## 提升数据资产价值
- 量化和分析 API 使用情况,更好地评估和提升数据资产价值。
- 为决策提供数据支持。
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.
APIPark uses the Apache 2.0 License. For more details, please refer to the LICENSE file.
<br>
## 🧾许可证
APIPark 使用 Apache 2.0 许可证。更多详情请查看 LICENSE 文件。
# 💌 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: contact@apipark.com
<br>
## 💌联系我们
对于企业级功能和专业技术支持,请联系售前专家进行个性化演示、定制方案和获取报价。
- 网站: https://apipark.com
- 电子邮件: dev@apipark.com
<br>
感谢您选择 APIPark,下一代 API 资产治理平台。
🙏 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.