Skip to main content

Cohere

Bundles 包含支援特定第三方整合的自訂Components,與 AgentBuilder 搭配使用。

此頁面描述 Cohere bundle 中可用的Components。

如需有關 Cohere Components所使用 Cohere 功能和功能的詳細資訊,請參閱 Cohere 文件

Cohere 文字生成

此Components使用 Cohere 的語言模型生成文字。

它可以輸出 Model Response (Message) 或 Language Model (LanguageModel)。

當您想要將 Cohere 模型用作另一個 LLM 驅動Components的 LLM 時,請使用 Language Model 輸出,例如 AgentSmart Function Components。

如需詳細資訊,請參閱語言模型Components

Cohere 文字生成參數

某些參數在視覺編輯器中預設為隱藏。 您可以透過 Components的標頭選單 中的 Controls 修改所有參數。

NameTypeDescription
InputString輸入參數。指定文字生成的輸入文字。
System MessageString輸入參數。要傳遞給模型的系統訊息
StreamBoolean輸入參數。是否串流回應。僅在聊天中有效。預設值:false
Cohere API KeySecretString輸入參數。您的 Cohere API 金鑰。
TemperatureFloat輸入參數。指定取樣的隨機性。較低的值(接近 0)更具確定性,較高的值(接近 1)更具創造性。預設值為 0.75

Cohere Embeddings

Cohere Embeddings Components用於從 Cohere 載入嵌入模型。

如需在 Flow中使用嵌入模型Components的詳細資訊,請參閱嵌入模型Components

Cohere Embeddings 參數

某些參數在視覺編輯器中預設為隱藏。 您可以透過 Components的標頭選單 中的 Controls 修改所有參數。

NameTypeDescription
cohere_api_keySecretString輸入參數。驗證 Cohere 服務所需的 API 金鑰。
modelString輸入參數。用於嵌入文字文件和執行查詢的語言模型。預設值:embed-english-v2.0
truncateBoolean輸入參數。如何處理超過模型權杖限制的輸入。選項為 NONESTARTEND(預設值)。如需詳細資訊,請參閱 Cohere truncate API 參考
max_retriesInteger輸入參數。失敗請求的最大重試次數。預設值:3
user_agentString輸入參數。要包含在請求中的使用者代理字串。預設值:langchain
request_timeoutFloat輸入參數。請求的逾時持續時間(秒)。預設值:None

Cohere Rerank

此Components使用 Cohere API 尋找並重新排序文件。

輸出包含重新排序文件的 Data,受 Top N 參數限制。

Cohere Rerank 參數

某些參數在視覺編輯器中預設為隱藏。 您可以透過 Components的標頭選單 中的 Controls 修改所有參數。

NameTypeDescription
Search QueryString輸入參數。重新排序文件的搜尋查詢。
Search ResultsData輸入參數。從向量儲存Components連接搜尋結果輸出。在向量資料庫上執行相似性搜尋後,使用此參數應用重新排序。
Top NInteger輸入參數。重新排序後要返回的文件數量。預設值:3
Cohere API KeySecretString輸入參數。您的 Cohere API 金鑰。
ModelString輸入參數。要使用的重新排序模型。預設值:rerank-english-v3.0
Search