with Airweave and Anthropic (Claude)?
Create a new Airweave collection. Collections are logical groups of data sources that provide unified search capabilities. The newly created collection is initially empty until you add source connections to it. See the documentation
Delete a collection and all associated data. This permanently removes the collection including all synced data and source connections. This action cannot be undone. See the documentation
Retrieve details of a specific collection by its readable ID. See the documentation
List all available data source connectors. These are the types of integrations Airweave can connect to (e.g., GitHub, Slack, Google Drive, PostgreSQL, etc.). See the documentation
import { AirweaveSDKClient } from "@airweave/sdk";
export default defineComponent({
props: {
airweave: {
type: "app",
app: "airweave",
}
},
async run({steps, $}) {
const client = new AirweaveSDKClient({
apiKey: this.airweave.$auth.api_key,
base_url: this.airweave.$auth.base_url
});
return await client.collections.list({
skip: 1,
limit: 1
});
},
})
The Anthropic (Claude) API offers a conversational AI that can be leveraged for a variety of applications, ranging from answering questions to generating content or providing customer support. In Pipedream, you can create powerful workflows that utilize the capabilities of Claude to automate responses, analyze text, or enhance data with AI-generated insights. Pipedream's serverless platform simplifies integrating Claude into your processes with other apps and services for seamless automation.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
anthropic: {
type: "app",
app: "anthropic",
}
},
async run({steps, $}) {
const data = {
"model": "claude-3-haiku-20240307",
"max_tokens": 300,
"messages": [
{"role": "user", "content": "Write me a haiku about Pipedream workflows."}
]
}
return await axios($, {
method: "post",
url: `https://api.anthropic.com/v1/messages`,
headers: {
"x-api-key": `${this.anthropic.$auth.api_key}`,
"anthropic-version": `2023-06-01`,
},
data,
})
},
})