FloomSDK 1.0.0
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 +7 -0
- data/.idea/.gitignore +8 -0
- data/.idea/FloomSDK-Ruby.iml +55 -0
- data/.idea/modules.xml +8 -0
- data/.idea/vcs.xml +6 -0
- data/CODE_OF_CONDUCT.md +84 -0
- data/FloomSDK.gemspec +33 -0
- data/LICENSE.txt +21 -0
- data/README.md +48 -0
- data/Rakefile +12 -0
- data/lib/FloomSDK/floom_client.rb +34 -0
- data/lib/FloomSDK/version.rb +5 -0
- data/sig/floom_client.rbs +11 -0
- metadata +60 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 703a8d136afd0e83cbd37839acf399b0c824816d47c9f26ca92d124bbf63c14a
|
4
|
+
data.tar.gz: 85634aabd6fe4e6e9f4738de3469666633a44dcf35fcb861eb3fea5d4f16d9e4
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 449eadf9af5f468f48264704a65a926d207ff61b539a292164323622c8281e10d1ead69a023cdfe32adb3af53dbd184c7e7e395456b4ac1f4f07d2290550d13b
|
7
|
+
data.tar.gz: b3cb90702d0318cce9ab249329036ddeb2a2a315373814a3ffdbbccd934b16cbf99fab3b7f1cc47e5359ab9b52c732b023099cbbca8f1e8348055c61d25c6426
|
data/.idea/.gitignore
ADDED
@@ -0,0 +1,55 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<module type="RUBY_MODULE" version="4">
|
3
|
+
<component name="ModuleRunConfigurationManager">
|
4
|
+
<shared />
|
5
|
+
</component>
|
6
|
+
<component name="NewModuleRootManager">
|
7
|
+
<content url="file://$MODULE_DIR$">
|
8
|
+
<sourceFolder url="file://$MODULE_DIR$/features" isTestSource="true" />
|
9
|
+
<sourceFolder url="file://$MODULE_DIR$/spec" isTestSource="true" />
|
10
|
+
<sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
|
11
|
+
</content>
|
12
|
+
<orderEntry type="jdk" jdkName="rbenv: 2.7.6" jdkType="RUBY_SDK" />
|
13
|
+
<orderEntry type="sourceFolder" forTests="false" />
|
14
|
+
<orderEntry type="library" scope="PROVIDED" name="bundler (v2.4.22, rbenv: 2.7.6) [gem]" level="application" />
|
15
|
+
<orderEntry type="library" scope="PROVIDED" name="httparty (v0.21.0, rbenv: 2.7.6) [gem]" level="application" />
|
16
|
+
<orderEntry type="library" scope="PROVIDED" name="json (v2.6.3, rbenv: 2.7.6) [gem]" level="application" />
|
17
|
+
<orderEntry type="library" scope="PROVIDED" name="mini_mime (v1.1.5, rbenv: 2.7.6) [gem]" level="application" />
|
18
|
+
<orderEntry type="library" scope="PROVIDED" name="minitest (v5.20.0, rbenv: 2.7.6) [gem]" level="application" />
|
19
|
+
<orderEntry type="library" scope="PROVIDED" name="multi_xml (v0.6.0, rbenv: 2.7.6) [gem]" level="application" />
|
20
|
+
<orderEntry type="library" scope="PROVIDED" name="rake (v13.1.0, rbenv: 2.7.6) [gem]" level="application" />
|
21
|
+
</component>
|
22
|
+
<component name="RakeTasksCache">
|
23
|
+
<option name="myRootTask">
|
24
|
+
<RakeTaskImpl id="rake">
|
25
|
+
<subtasks>
|
26
|
+
<RakeTaskImpl description="Build FloomSDK-Ruby-1.0.0.gem into the pkg directory" fullCommand="build" id="build" />
|
27
|
+
<RakeTaskImpl id="build">
|
28
|
+
<subtasks>
|
29
|
+
<RakeTaskImpl description="Generate SHA512 checksum if FloomSDK-Ruby-1.0.0.gem into the checksums directory" fullCommand="build:checksum" id="checksum" />
|
30
|
+
</subtasks>
|
31
|
+
</RakeTaskImpl>
|
32
|
+
<RakeTaskImpl description="Remove any temporary products" fullCommand="clean" id="clean" />
|
33
|
+
<RakeTaskImpl description="Remove any generated files" fullCommand="clobber" id="clobber" />
|
34
|
+
<RakeTaskImpl description="Build and install FloomSDK-Ruby-1.0.0.gem into system gems" fullCommand="install" id="install" />
|
35
|
+
<RakeTaskImpl id="install">
|
36
|
+
<subtasks>
|
37
|
+
<RakeTaskImpl description="Build and install FloomSDK-Ruby-1.0.0.gem into system gems without network access" fullCommand="install:local" id="local" />
|
38
|
+
</subtasks>
|
39
|
+
</RakeTaskImpl>
|
40
|
+
<RakeTaskImpl description="Create tag v1.0.0 and build and push FloomSDK-Ruby-1.0.0.gem to TODO: Set to your gem server 'https://example.com'" fullCommand="release[remote]" id="release[remote]" />
|
41
|
+
<RakeTaskImpl description="Run tests" fullCommand="test" id="test" />
|
42
|
+
<RakeTaskImpl description="" fullCommand="default" id="default" />
|
43
|
+
<RakeTaskImpl description="" fullCommand="release" id="release" />
|
44
|
+
<RakeTaskImpl id="release">
|
45
|
+
<subtasks>
|
46
|
+
<RakeTaskImpl description="" fullCommand="release:guard_clean" id="guard_clean" />
|
47
|
+
<RakeTaskImpl description="" fullCommand="release:rubygem_push" id="rubygem_push" />
|
48
|
+
<RakeTaskImpl description="" fullCommand="release:source_control_push" id="source_control_push" />
|
49
|
+
</subtasks>
|
50
|
+
</RakeTaskImpl>
|
51
|
+
</subtasks>
|
52
|
+
</RakeTaskImpl>
|
53
|
+
</option>
|
54
|
+
</component>
|
55
|
+
</module>
|
data/.idea/modules.xml
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<project version="4">
|
3
|
+
<component name="ProjectModuleManager">
|
4
|
+
<modules>
|
5
|
+
<module fileurl="file://$PROJECT_DIR$/.idea/FloomSDK-Ruby.iml" filepath="$PROJECT_DIR$/.idea/FloomSDK-Ruby.iml" />
|
6
|
+
</modules>
|
7
|
+
</component>
|
8
|
+
</project>
|
data/.idea/vcs.xml
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,84 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
|
6
|
+
|
7
|
+
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
|
8
|
+
|
9
|
+
## Our Standards
|
10
|
+
|
11
|
+
Examples of behavior that contributes to a positive environment for our community include:
|
12
|
+
|
13
|
+
* Demonstrating empathy and kindness toward other people
|
14
|
+
* Being respectful of differing opinions, viewpoints, and experiences
|
15
|
+
* Giving and gracefully accepting constructive feedback
|
16
|
+
* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
|
17
|
+
* Focusing on what is best not just for us as individuals, but for the overall community
|
18
|
+
|
19
|
+
Examples of unacceptable behavior include:
|
20
|
+
|
21
|
+
* The use of sexualized language or imagery, and sexual attention or
|
22
|
+
advances of any kind
|
23
|
+
* Trolling, insulting or derogatory comments, and personal or political attacks
|
24
|
+
* Public or private harassment
|
25
|
+
* Publishing others' private information, such as a physical or email
|
26
|
+
address, without their explicit permission
|
27
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
28
|
+
professional setting
|
29
|
+
|
30
|
+
## Enforcement Responsibilities
|
31
|
+
|
32
|
+
Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
|
33
|
+
|
34
|
+
Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
|
35
|
+
|
36
|
+
## Scope
|
37
|
+
|
38
|
+
This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
|
39
|
+
|
40
|
+
## Enforcement
|
41
|
+
|
42
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at 139365825+FloomAI@users.noreply.github.com. All complaints will be reviewed and investigated promptly and fairly.
|
43
|
+
|
44
|
+
All community leaders are obligated to respect the privacy and security of the reporter of any incident.
|
45
|
+
|
46
|
+
## Enforcement Guidelines
|
47
|
+
|
48
|
+
Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
|
49
|
+
|
50
|
+
### 1. Correction
|
51
|
+
|
52
|
+
**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
|
53
|
+
|
54
|
+
**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
|
55
|
+
|
56
|
+
### 2. Warning
|
57
|
+
|
58
|
+
**Community Impact**: A violation through a single incident or series of actions.
|
59
|
+
|
60
|
+
**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
|
61
|
+
|
62
|
+
### 3. Temporary Ban
|
63
|
+
|
64
|
+
**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
|
65
|
+
|
66
|
+
**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
|
67
|
+
|
68
|
+
### 4. Permanent Ban
|
69
|
+
|
70
|
+
**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
|
71
|
+
|
72
|
+
**Consequence**: A permanent ban from any sort of public interaction within the community.
|
73
|
+
|
74
|
+
## Attribution
|
75
|
+
|
76
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
|
77
|
+
available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
|
78
|
+
|
79
|
+
Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
|
80
|
+
|
81
|
+
[homepage]: https://www.contributor-covenant.org
|
82
|
+
|
83
|
+
For answers to common questions about this code of conduct, see the FAQ at
|
84
|
+
https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
|
data/FloomSDK.gemspec
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "lib/FloomSDK/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = "FloomSDK"
|
7
|
+
spec.version = FloomSDK::VERSION
|
8
|
+
spec.authors = ["Floom"]
|
9
|
+
spec.email = ["dev@floom.ai"]
|
10
|
+
|
11
|
+
spec.summary = "Floom orchestrates and executes Generative AI pipelines, allowing developers and DevOps teams to focus on what matters most. It offers enterprise-grade, production-ready, and battle-tested solutions, now open-source and free for everyone, including commercial use."
|
12
|
+
spec.homepage = "https://floom.ai"
|
13
|
+
spec.license = "MIT"
|
14
|
+
spec.required_ruby_version = ">= 2.6.0"
|
15
|
+
|
16
|
+
spec.metadata["homepage_uri"] = "https://floom.ai"
|
17
|
+
spec.metadata["source_code_uri"] = "https://github.com/FloomAI/FloomSDK-Ruby"
|
18
|
+
# spec.metadata["changelog_uri"] = Put your gem's CHANGELOG.md URL here.
|
19
|
+
|
20
|
+
# Specify which files should be added to the gem when it is released.
|
21
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
22
|
+
spec.files = Dir.chdir(__dir__) do
|
23
|
+
`git ls-files -z`.split("\x0").reject do |f|
|
24
|
+
(File.expand_path(f) == __FILE__) ||
|
25
|
+
f.start_with?(*%w[bin/ test/ spec/ features/ .git appveyor Gemfile])
|
26
|
+
end
|
27
|
+
end
|
28
|
+
spec.bindir = "exe"
|
29
|
+
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
30
|
+
spec.require_paths = ["lib"]
|
31
|
+
# For more information and examples about making a new gem, check out our
|
32
|
+
# guide at: https://bundler.io/guides/creating_gem.html
|
33
|
+
end
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2023 Floom
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,48 @@
|
|
1
|
+
<div align="center">
|
2
|
+
|
3
|
+
# FloomSDK-Ruby
|
4
|
+
|
5
|
+
**Floom Ruby SDK** - A Ruby library for interacting with [Floom](https://floom.ai), an AI Orchestration platform that empowers Developers and DevOps.
|
6
|
+
|
7
|
+
</div>
|
8
|
+
|
9
|
+
## About Floom
|
10
|
+
|
11
|
+
[Floom](https://floom.ai) orchestrates and executes Generative AI pipelines, allowing developers and DevOps teams to focus on what matters most. It offers enterprise-grade, production-ready, and battle-tested solutions, now open-source and free for everyone, including commercial use.
|
12
|
+
|
13
|
+
Floom's AI Pipeline model simplifies the integration and execution process of Generative AI, handling everything from prompt design and data linking to execution and cost management.
|
14
|
+
|
15
|
+
## Getting Started with FloomSDK-Ruby
|
16
|
+
|
17
|
+
### Installation
|
18
|
+
|
19
|
+
To start using FloomSDK-Ruby, add the following line to your application's Gemfile:
|
20
|
+
|
21
|
+
```ruby
|
22
|
+
gem 'floom_sdk_ruby', '~> 1.0'
|
23
|
+
```
|
24
|
+
And then execute:
|
25
|
+
|
26
|
+
```ruby
|
27
|
+
bundle install
|
28
|
+
```
|
29
|
+
|
30
|
+
### Usage
|
31
|
+
Here's how you can use the Floom Ruby SDK in your application:
|
32
|
+
```ruby
|
33
|
+
require 'floom_sdk_ruby'
|
34
|
+
|
35
|
+
client = FloomSDK::Client.new("floom_endpoint", "api_key")
|
36
|
+
|
37
|
+
# Example: Running a pipeline
|
38
|
+
begin
|
39
|
+
response = client.run("your_pipeline_id", "your_chat_id", "your_input", {})
|
40
|
+
puts "Response: #{response}"
|
41
|
+
rescue => e
|
42
|
+
puts "Error: #{e.message}"
|
43
|
+
end
|
44
|
+
```
|
45
|
+
|
46
|
+
This README provides a concise yet comprehensive introduction to Floom and its Ruby SDK. It includes installation instructions, a basic usage example, links to further documentation, contribution guidelines, and licensing information. The structure is designed to be user-friendly and to enhance the visibility of your project.
|
47
|
+
|
48
|
+
For more information, visit us at https://floom.ai.
|
data/Rakefile
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require 'httparty'
|
3
|
+
require 'json'
|
4
|
+
|
5
|
+
module FloomSDK
|
6
|
+
class Client
|
7
|
+
include HTTParty
|
8
|
+
def initialize(base_url, api_key)
|
9
|
+
@api_key = api_key
|
10
|
+
@base_url = base_url
|
11
|
+
@headers = {
|
12
|
+
"Api-Key" => @api_key,
|
13
|
+
"Content-Type" => "application/json"
|
14
|
+
}
|
15
|
+
end
|
16
|
+
|
17
|
+
def run(pipeline_id, chat_id, input)
|
18
|
+
floom_request = {
|
19
|
+
pipelineId: pipeline_id,
|
20
|
+
chatId: chat_id,
|
21
|
+
input: input
|
22
|
+
}
|
23
|
+
response = self.class.post("#{@base_url}/v1/Pipelines/Run",
|
24
|
+
body: floom_request.to_json,
|
25
|
+
headers: @headers)
|
26
|
+
|
27
|
+
if response.success?
|
28
|
+
JSON.parse(response.body)
|
29
|
+
else
|
30
|
+
raise "Failed to run the pipeline: #{response.body}"
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
module FloomSDK
|
2
|
+
VERSION: String
|
3
|
+
class Client
|
4
|
+
@api_key: String
|
5
|
+
@base_url: String
|
6
|
+
@headers: Hash[String, String]
|
7
|
+
|
8
|
+
def initialize: (String, String) -> void
|
9
|
+
def run: (String, String, String, ?Hash[String, String]) -> Hash[untyped, untyped]
|
10
|
+
end
|
11
|
+
end
|
metadata
ADDED
@@ -0,0 +1,60 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: FloomSDK
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Floom
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2023-11-23 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description:
|
14
|
+
email:
|
15
|
+
- dev@floom.ai
|
16
|
+
executables: []
|
17
|
+
extensions: []
|
18
|
+
extra_rdoc_files: []
|
19
|
+
files:
|
20
|
+
- ".idea/.gitignore"
|
21
|
+
- ".idea/FloomSDK-Ruby.iml"
|
22
|
+
- ".idea/modules.xml"
|
23
|
+
- ".idea/vcs.xml"
|
24
|
+
- CODE_OF_CONDUCT.md
|
25
|
+
- FloomSDK.gemspec
|
26
|
+
- LICENSE.txt
|
27
|
+
- README.md
|
28
|
+
- Rakefile
|
29
|
+
- lib/FloomSDK/floom_client.rb
|
30
|
+
- lib/FloomSDK/version.rb
|
31
|
+
- sig/floom_client.rbs
|
32
|
+
homepage: https://floom.ai
|
33
|
+
licenses:
|
34
|
+
- MIT
|
35
|
+
metadata:
|
36
|
+
homepage_uri: https://floom.ai
|
37
|
+
source_code_uri: https://github.com/FloomAI/FloomSDK-Ruby
|
38
|
+
post_install_message:
|
39
|
+
rdoc_options: []
|
40
|
+
require_paths:
|
41
|
+
- lib
|
42
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - ">="
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: 2.6.0
|
47
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
48
|
+
requirements:
|
49
|
+
- - ">="
|
50
|
+
- !ruby/object:Gem::Version
|
51
|
+
version: '0'
|
52
|
+
requirements: []
|
53
|
+
rubygems_version: 3.1.6
|
54
|
+
signing_key:
|
55
|
+
specification_version: 4
|
56
|
+
summary: Floom orchestrates and executes Generative AI pipelines, allowing developers
|
57
|
+
and DevOps teams to focus on what matters most. It offers enterprise-grade, production-ready,
|
58
|
+
and battle-tested solutions, now open-source and free for everyone, including commercial
|
59
|
+
use.
|
60
|
+
test_files: []
|