mirror of
https://github.com/hwchase17/langchain
synced 2024-11-04 06:00:26 +00:00
32c5be8b73
## Summary This PR implements the "Connery Action Tool" and "Connery Toolkit". Using them, you can integrate Connery actions into your LangChain agents and chains. Connery is an open-source plugin infrastructure for AI. With Connery, you can easily create a custom plugin with a set of actions and seamlessly integrate them into your LangChain agents and chains. Connery will handle the rest: runtime, authorization, secret management, access management, audit logs, and other vital features. Additionally, Connery and our community offer a wide range of ready-to-use open-source plugins for your convenience. Learn more about Connery: - GitHub: https://github.com/connery-io/connery-platform - Documentation: https://docs.connery.io - Twitter: https://twitter.com/connery_io ## TODOs - [x] API wrapper - [x] Integration tests - [x] Connery Action Tool - [x] Docs - [x] Example - [x] Integration tests - [x] Connery Toolkit - [x] Docs - [x] Example - [x] Formatting (`make format`) - [x] Linting (`make lint`) - [x] Testing (`make test`)
33 lines
647 B
Python
33 lines
647 B
Python
from typing import List, Optional
|
|
|
|
from langchain_core.pydantic_v1 import BaseModel
|
|
|
|
|
|
class Validation(BaseModel):
|
|
"""Connery Action parameter validation model."""
|
|
|
|
required: Optional[bool] = None
|
|
|
|
|
|
class Parameter(BaseModel):
|
|
"""Connery Action parameter model."""
|
|
|
|
key: str
|
|
title: str
|
|
description: Optional[str] = None
|
|
type: str
|
|
validation: Optional[Validation] = None
|
|
|
|
|
|
class Action(BaseModel):
|
|
"""Connery Action model."""
|
|
|
|
id: str
|
|
key: str
|
|
title: str
|
|
description: Optional[str] = None
|
|
type: str
|
|
inputParameters: List[Parameter]
|
|
outputParameters: List[Parameter]
|
|
pluginId: str
|