{"command":{"effect":"write","timeoutSeconds":30,"inputSchema":{"type":"object","description":"To add a data source to a knowledge base, send a POST request to `/v2/gen-ai/knowledge_bases/{knowledge_base_uuid}/data_sources`.","properties":{"path":{"type":"object","properties":{"knowledge_base_uuid":{"type":"string","examples":["\"123e4567-e89b-12d3-a456-426614174000\""],"description":"Knowledge base id"}},"required":["knowledge_base_uuid"],"additionalProperties":false},"body":{"$ref":"#/definitions/apiCreateKnowledgeBaseDataSourceInputPublic"}},"required":["path"],"additionalProperties":false,"definitions":{"apiCreateKnowledgeBaseDataSourceInputPublic":{"description":"Data to create a knowledge base data source","properties":{"aws_data_source":{"$ref":"#/definitions/apiAWSDataSource"},"chunking_algorithm":{"$ref":"#/definitions/apiChunkingAlgorithm"},"chunking_options":{"$ref":"#/definitions/apiChunkingOptions"},"knowledge_base_uuid":{"description":"Knowledge base id","type":"string","examples":["\"12345678-1234-1234-1234-123456789012\""]},"spaces_data_source":{"$ref":"#/definitions/apiSpacesDataSource"},"web_crawler_data_source":{"$ref":"#/definitions/apiWebCrawlerDataSource"}},"type":"object"},"apiAWSDataSource":{"description":"AWS S3 Data Source","properties":{"bucket_name":{"description":"Spaces bucket name","type":"string","examples":["example name"]},"item_path":{"type":"string","examples":["example string"]},"key_id":{"description":"The AWS Key ID","type":"string","examples":["123e4567-e89b-12d3-a456-426614174000"]},"region":{"description":"Region of bucket","type":"string","examples":["example string"]},"secret_key":{"description":"The AWS Secret Key","type":"string","examples":["example string"]}},"type":"object"},"apiChunkingAlgorithm":{"default":"CHUNKING_ALGORITHM_UNKNOWN","enum":["CHUNKING_ALGORITHM_UNKNOWN","CHUNKING_ALGORITHM_SECTION_BASED","CHUNKING_ALGORITHM_HIERARCHICAL","CHUNKING_ALGORITHM_SEMANTIC","CHUNKING_ALGORITHM_FIXED_LENGTH"],"type":"string","examples":["CHUNKING_ALGORITHM_UNKNOWN"]},"apiChunkingOptions":{"properties":{"child_chunk_size":{"type":"integer","examples":[350]},"max_chunk_size":{"description":"Common options","type":"integer","examples":[750]},"parent_chunk_size":{"description":"Hierarchical options","type":"integer","examples":[1000]},"semantic_threshold":{"description":"Semantic options","type":"number","examples":[0.5]}},"type":"object"},"apiSpacesDataSource":{"description":"Spaces Bucket Data Source","properties":{"bucket_name":{"description":"Spaces bucket name","type":"string","examples":["example name"]},"item_path":{"type":"string","examples":["example string"]},"region":{"description":"Region of bucket","type":"string","examples":["example string"]}},"type":"object"},"apiWebCrawlerDataSource":{"description":"WebCrawlerDataSource","properties":{"base_url":{"description":"The base url to crawl.","type":"string","examples":["example string"]},"crawling_option":{"$ref":"#/definitions/apiCrawlingOption"},"embed_media":{"description":"Whether to ingest and index media (images, etc.) on web pages.","type":"boolean","examples":[true]},"exclude_tags":{"description":"Declaring which tags to exclude in web pages while webcrawling","items":{"type":"string","examples":["example string"]},"type":"array","examples":[["example string"]]}},"type":"object"},"apiCrawlingOption":{"default":"UNKNOWN","description":"Options for specifying how URLs found on pages should be handled.\n\n - UNKNOWN: Default unknown value\n - SCOPED: Only include the base URL.\n - PATH: Crawl the base URL and linked pages within the URL path.\n - DOMAIN: Crawl the base URL and linked pages within the same domain.\n - SUBDOMAINS: Crawl the base URL and linked pages for any subdomain.\n - SITEMAP: Crawl URLs discovered in the sitemap.","enum":["UNKNOWN","SCOPED","PATH","DOMAIN","SUBDOMAINS","SITEMAP"],"type":"string","examples":["UNKNOWN"]}}},"name":"Add Data Source to a Knowledge Base","id":"digitalocean.genai_create_knowledge_base_data_source","example":{"path":{"knowledge_base_uuid":"\"123e4567-e89b-12d3-a456-426614174000\""}},"maxRequests":1,"summary":false}}