multiwoven-integrations 0.21.0 → 0.21.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/multiwoven/integrations/core/constants.rb +1 -1
- data/lib/multiwoven/integrations/rollout.rb +2 -2
- data/lib/multiwoven/integrations/source/{antropic → anthropic}/client.rb +12 -12
- data/lib/multiwoven/integrations/source/{antropic → anthropic}/config/meta.json +3 -3
- data/lib/multiwoven/integrations/source/{antropic → anthropic}/config/spec.json +3 -3
- data/lib/multiwoven/integrations.rb +1 -1
- metadata +7 -7
- /data/lib/multiwoven/integrations/source/{antropic → anthropic}/config/catalog.json +0 -0
- /data/lib/multiwoven/integrations/source/{antropic → anthropic}/icon.svg +0 -0
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 56988c5469bca9dfbeed81eda87aa8efa2b3b76419cd0bdcb40c1150c24cb49b
         | 
| 4 | 
            +
              data.tar.gz: aba8d648fbd4415a066c16942487db2c4289fb625afca49efc85388505d94504
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: df96f2721a039f7ce084c6ad217eebdf5e64f11d0987d447317be48803cdb7903c59d6e003b4e1ab2c9856e3bef4add991d4408efd829862b322df7eb55fba15
         | 
| 7 | 
            +
              data.tar.gz: f8591fe980e749a772f8d95b9bac6e944630ff5850ea337075da6887fd098e57f6ebca80d4f1440fbc2f958ef558661f90200293cc1d3141cbb2a80b04253ce6
         | 
| @@ -72,7 +72,7 @@ module Multiwoven | |
| 72 72 | 
             
                  GOOGLE_SPREADSHEET_ID_REGEX = %r{/d/([-\w]{20,})/}.freeze
         | 
| 73 73 |  | 
| 74 74 | 
             
                  OPEN_AI_URL = "https://api.openai.com/v1/chat/completions"
         | 
| 75 | 
            -
                   | 
| 75 | 
            +
                  ANTHROPIC_URL = "https://api.anthropic.com/v1/messages"
         | 
| 76 76 | 
             
                end
         | 
| 77 77 | 
             
              end
         | 
| 78 78 | 
             
            end
         | 
| @@ -2,7 +2,7 @@ | |
| 2 2 |  | 
| 3 3 | 
             
            module Multiwoven
         | 
| 4 4 | 
             
              module Integrations
         | 
| 5 | 
            -
                VERSION = "0.21. | 
| 5 | 
            +
                VERSION = "0.21.2"
         | 
| 6 6 |  | 
| 7 7 | 
             
                ENABLED_SOURCES = %w[
         | 
| 8 8 | 
             
                  Snowflake
         | 
| @@ -23,7 +23,7 @@ module Multiwoven | |
| 23 23 | 
             
                  OpenAI
         | 
| 24 24 | 
             
                  Sftp
         | 
| 25 25 | 
             
                  WatsonxAi
         | 
| 26 | 
            -
                   | 
| 26 | 
            +
                  Anthropic
         | 
| 27 27 | 
             
                ].freeze
         | 
| 28 28 |  | 
| 29 29 | 
             
                ENABLED_DESTINATIONS = %w[
         | 
| @@ -1,16 +1,16 @@ | |
| 1 1 | 
             
            # frozen_string_literal: true
         | 
| 2 2 |  | 
| 3 3 | 
             
            module Multiwoven::Integrations::Source
         | 
| 4 | 
            -
              module  | 
| 4 | 
            +
              module Anthropic
         | 
| 5 5 | 
             
                include Multiwoven::Integrations::Core
         | 
| 6 6 | 
             
                class Client < SourceConnector
         | 
| 7 7 | 
             
                  API_VERSION = "2023-06-01"
         | 
| 8 8 | 
             
                  def check_connection(connection_config)
         | 
| 9 9 | 
             
                    connection_config = prepare_config(connection_config)
         | 
| 10 | 
            -
                    response = make_request( | 
| 10 | 
            +
                    response = make_request(ANTHROPIC_URL, HTTP_POST, connection_config[:request_format], connection_config)
         | 
| 11 11 | 
             
                    success?(response) ? success_status : failure_status(nil)
         | 
| 12 12 | 
             
                  rescue StandardError => e
         | 
| 13 | 
            -
                    handle_exception(e, { context: " | 
| 13 | 
            +
                    handle_exception(e, { context: "ANTHROPIC:CHECK_CONNECTION:EXCEPTION", type: "error" })
         | 
| 14 14 | 
             
                    failure_status(e)
         | 
| 15 15 | 
             
                  end
         | 
| 16 16 |  | 
| @@ -19,7 +19,7 @@ module Multiwoven::Integrations::Source | |
| 19 19 | 
             
                    catalog = build_catalog(catalog_json)
         | 
| 20 20 | 
             
                    catalog.to_multiwoven_message
         | 
| 21 21 | 
             
                  rescue StandardError => e
         | 
| 22 | 
            -
                    handle_exception(e, { context: " | 
| 22 | 
            +
                    handle_exception(e, { context: "ANTHROPIC:DISCOVER:EXCEPTION", type: "error" })
         | 
| 23 23 | 
             
                  end
         | 
| 24 24 |  | 
| 25 25 | 
             
                  def read(sync_config)
         | 
| @@ -35,7 +35,7 @@ module Multiwoven::Integrations::Source | |
| 35 35 | 
             
                      run_model(connection_config, payload)
         | 
| 36 36 | 
             
                    end
         | 
| 37 37 | 
             
                  rescue StandardError => e
         | 
| 38 | 
            -
                    handle_exception(e, { context: " | 
| 38 | 
            +
                    handle_exception(e, { context: "ANTHROPIC:READ:EXCEPTION", type: "error" })
         | 
| 39 39 | 
             
                  end
         | 
| 40 40 |  | 
| 41 41 | 
             
                  private
         | 
| @@ -49,7 +49,7 @@ module Multiwoven::Integrations::Source | |
| 49 49 | 
             
                  def parse_json(json_string)
         | 
| 50 50 | 
             
                    JSON.parse(json_string)
         | 
| 51 51 | 
             
                  rescue JSON::ParserError => e
         | 
| 52 | 
            -
                    handle_exception(e, { context: " | 
| 52 | 
            +
                    handle_exception(e, { context: "ANTHROPIC:PARSE_JSON:EXCEPTION", type: "error" })
         | 
| 53 53 | 
             
                    {}
         | 
| 54 54 | 
             
                  end
         | 
| 55 55 |  | 
| @@ -74,15 +74,15 @@ module Multiwoven::Integrations::Source | |
| 74 74 | 
             
                  end
         | 
| 75 75 |  | 
| 76 76 | 
             
                  def run_model(connection_config, payload)
         | 
| 77 | 
            -
                    response = make_request( | 
| 77 | 
            +
                    response = make_request(ANTHROPIC_URL, HTTP_POST, payload, connection_config)
         | 
| 78 78 | 
             
                    process_response(response)
         | 
| 79 79 | 
             
                  rescue StandardError => e
         | 
| 80 | 
            -
                    handle_exception(e, { context: " | 
| 80 | 
            +
                    handle_exception(e, { context: "ANTHROPIC:RUN_MODEL:EXCEPTION", type: "error" })
         | 
| 81 81 | 
             
                  end
         | 
| 82 82 |  | 
| 83 83 | 
             
                  def run_model_stream(connection_config, payload)
         | 
| 84 84 | 
             
                    send_streaming_request(
         | 
| 85 | 
            -
                      url:  | 
| 85 | 
            +
                      url: ANTHROPIC_URL,
         | 
| 86 86 | 
             
                      http_method: HTTP_POST,
         | 
| 87 87 | 
             
                      payload: JSON.parse(payload),
         | 
| 88 88 | 
             
                      headers: build_headers(connection_config, streaming: true),
         | 
| @@ -91,7 +91,7 @@ module Multiwoven::Integrations::Source | |
| 91 91 | 
             
                      process_streaming_response(chunk) { |message| yield message if block_given? }
         | 
| 92 92 | 
             
                    end
         | 
| 93 93 | 
             
                  rescue StandardError => e
         | 
| 94 | 
            -
                    handle_exception(e, { context: " | 
| 94 | 
            +
                    handle_exception(e, { context: "ANTHROPIC:RUN_STREAM_MODEL:EXCEPTION", type: "error" })
         | 
| 95 95 | 
             
                  end
         | 
| 96 96 |  | 
| 97 97 | 
             
                  def process_response(response)
         | 
| @@ -99,10 +99,10 @@ module Multiwoven::Integrations::Source | |
| 99 99 | 
             
                      data = JSON.parse(response.body)
         | 
| 100 100 | 
             
                      [RecordMessage.new(data: data, emitted_at: Time.now.to_i).to_multiwoven_message]
         | 
| 101 101 | 
             
                    else
         | 
| 102 | 
            -
                      create_log_message(" | 
| 102 | 
            +
                      create_log_message("ANTHROPIC:RUN_MODEL", "error", "request failed: #{response.body}")
         | 
| 103 103 | 
             
                    end
         | 
| 104 104 | 
             
                  rescue StandardError => e
         | 
| 105 | 
            -
                    handle_exception(e, { context: " | 
| 105 | 
            +
                    handle_exception(e, { context: "ANTHROPIC:PROCESS_RESPONSE:EXCEPTION", type: "error" })
         | 
| 106 106 | 
             
                  end
         | 
| 107 107 |  | 
| 108 108 | 
             
                  def check_chunk_error(chunk)
         | 
| @@ -1,11 +1,11 @@ | |
| 1 1 | 
             
            {
         | 
| 2 2 | 
             
              "data": {
         | 
| 3 | 
            -
                "name": " | 
| 4 | 
            -
                "title": " | 
| 3 | 
            +
                "name": "Anthropic",
         | 
| 4 | 
            +
                "title": "Anthropic Model Endpoint",
         | 
| 5 5 | 
             
                "connector_type": "source",
         | 
| 6 6 | 
             
                "category": "AI Model",
         | 
| 7 7 | 
             
                "documentation_url": "https://docs.mutltiwoven.com",
         | 
| 8 | 
            -
                "github_issue_label": "source- | 
| 8 | 
            +
                "github_issue_label": "source-anthropic-model",
         | 
| 9 9 | 
             
                "icon": "icon.svg",
         | 
| 10 10 | 
             
                "license": "MIT",
         | 
| 11 11 | 
             
                "release_stage": "alpha",
         | 
| @@ -1,10 +1,10 @@ | |
| 1 1 | 
             
            {
         | 
| 2 | 
            -
              "documentation_url": "https://docs.multiwoven.com/integrations/source/ | 
| 2 | 
            +
              "documentation_url": "https://docs.multiwoven.com/integrations/source/anthropic-model",
         | 
| 3 3 | 
             
              "stream_type": "user_defined",
         | 
| 4 4 | 
             
              "connector_query_type": "ai_ml",
         | 
| 5 5 | 
             
              "connection_specification": {
         | 
| 6 6 | 
             
                "$schema": "http://json-schema.org/draft-07/schema#",
         | 
| 7 | 
            -
                "title": " | 
| 7 | 
            +
                "title": "Anthropic Endpoint",
         | 
| 8 8 | 
             
                "type": "object",
         | 
| 9 9 | 
             
                "required": ["api_key", "request_format", "response_format"],
         | 
| 10 10 | 
             
                "properties": {
         | 
| @@ -39,7 +39,7 @@ | |
| 39 39 | 
             
                    "title": "Request Format",
         | 
| 40 40 | 
             
                    "description": "Sample Request Format",
         | 
| 41 41 | 
             
                    "type": "string",
         | 
| 42 | 
            -
                    "default": "{\"model\":\"claude-3- | 
| 42 | 
            +
                    "default": "{\"model\":\"claude-3-opus-20240229\",\"max_tokens\": 256, \"messages\":[{\"role\": \"user\", \"content\": \"Hi.\"}], \"stream\": false}",
         | 
| 43 43 | 
             
                    "x-request-format": true,
         | 
| 44 44 | 
             
                    "order": 3
         | 
| 45 45 | 
             
                  },
         | 
| @@ -76,7 +76,7 @@ require_relative "integrations/source/http_model/client" | |
| 76 76 | 
             
            require_relative "integrations/source/open_ai/client"
         | 
| 77 77 | 
             
            require_relative "integrations/source/sftp/client"
         | 
| 78 78 | 
             
            require_relative "integrations/source/watsonx_ai/client"
         | 
| 79 | 
            -
            require_relative "integrations/source/ | 
| 79 | 
            +
            require_relative "integrations/source/anthropic/client"
         | 
| 80 80 |  | 
| 81 81 | 
             
            # Destination
         | 
| 82 82 | 
             
            require_relative "integrations/destination/klaviyo/client"
         | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: multiwoven-integrations
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.21. | 
| 4 | 
            +
              version: 0.21.2
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Subin T P
         | 
| 8 8 | 
             
            autorequire:
         | 
| 9 9 | 
             
            bindir: exe
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2025-03- | 
| 11 | 
            +
            date: 2025-03-24 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: activesupport
         | 
| @@ -705,11 +705,11 @@ files: | |
| 705 705 | 
             
            - lib/multiwoven/integrations/source/amazon_s3/config/meta.json
         | 
| 706 706 | 
             
            - lib/multiwoven/integrations/source/amazon_s3/config/spec.json
         | 
| 707 707 | 
             
            - lib/multiwoven/integrations/source/amazon_s3/icon.svg
         | 
| 708 | 
            -
            - lib/multiwoven/integrations/source/ | 
| 709 | 
            -
            - lib/multiwoven/integrations/source/ | 
| 710 | 
            -
            - lib/multiwoven/integrations/source/ | 
| 711 | 
            -
            - lib/multiwoven/integrations/source/ | 
| 712 | 
            -
            - lib/multiwoven/integrations/source/ | 
| 708 | 
            +
            - lib/multiwoven/integrations/source/anthropic/client.rb
         | 
| 709 | 
            +
            - lib/multiwoven/integrations/source/anthropic/config/catalog.json
         | 
| 710 | 
            +
            - lib/multiwoven/integrations/source/anthropic/config/meta.json
         | 
| 711 | 
            +
            - lib/multiwoven/integrations/source/anthropic/config/spec.json
         | 
| 712 | 
            +
            - lib/multiwoven/integrations/source/anthropic/icon.svg
         | 
| 713 713 | 
             
            - lib/multiwoven/integrations/source/aws_athena/client.rb
         | 
| 714 714 | 
             
            - lib/multiwoven/integrations/source/aws_athena/config/meta.json
         | 
| 715 715 | 
             
            - lib/multiwoven/integrations/source/aws_athena/config/spec.json
         | 
| 
            File without changes
         | 
| 
            File without changes
         |