Module: RubyLLM::Text
- Defined in:
- lib/ruby_llm/text.rb,
lib/ruby_llm/text/base.rb,
lib/ruby_llm/text/answer.rb,
lib/ruby_llm/text/extract.rb,
lib/ruby_llm/text/grammar.rb,
lib/ruby_llm/text/rewrite.rb,
lib/ruby_llm/text/version.rb,
lib/ruby_llm/text/classify.rb,
lib/ruby_llm/text/sentiment.rb,
lib/ruby_llm/text/summarize.rb,
lib/ruby_llm/text/translate.rb,
lib/ruby_llm/text/key_points.rb,
lib/ruby_llm/text/configuration.rb
Defined Under Namespace
Modules: Answer, Base, Classify, Extract, Grammar, KeyPoints, Rewrite, Sentiment, Summarize, Translate
Classes: Configuration, Error
Constant Summary
collapse
- VERSION =
"0.2.0"
Class Method Summary
collapse
-
.answer(text, question, **options) ⇒ Object
-
.classify(text, **options) ⇒ Object
-
.config ⇒ Object
-
.configure(&block) ⇒ Object
-
.extract(text, **options) ⇒ Object
-
.fix_grammar(text, **options) ⇒ Object
-
.key_points(text, **options) ⇒ Object
-
.rewrite(text, **options) ⇒ Object
-
.sentiment(text, **options) ⇒ Object
-
.summarize(text, **options) ⇒ Object
Module-style API methods.
-
.translate(text, **options) ⇒ Object
Class Method Details
.answer(text, question, **options) ⇒ Object
62
63
64
|
# File 'lib/ruby_llm/text.rb', line 62
def answer(text, question, **options)
Answer.call(text, question, **options)
end
|
.classify(text, **options) ⇒ Object
42
43
44
|
# File 'lib/ruby_llm/text.rb', line 42
def classify(text, **options)
Classify.call(text, **options)
end
|
.config ⇒ Object
25
26
27
|
# File 'lib/ruby_llm/text.rb', line 25
def config
@config ||= Configuration.new
end
|
20
21
22
23
|
# File 'lib/ruby_llm/text.rb', line 20
def configure(&block)
config.instance_eval(&block) if block_given?
config
end
|
38
39
40
|
# File 'lib/ruby_llm/text.rb', line 38
def (text, **options)
Extract.call(text, **options)
end
|
.fix_grammar(text, **options) ⇒ Object
46
47
48
|
# File 'lib/ruby_llm/text.rb', line 46
def fix_grammar(text, **options)
Grammar.call(text, **options)
end
|
.key_points(text, **options) ⇒ Object
54
55
56
|
# File 'lib/ruby_llm/text.rb', line 54
def key_points(text, **options)
KeyPoints.call(text, **options)
end
|
.rewrite(text, **options) ⇒ Object
58
59
60
|
# File 'lib/ruby_llm/text.rb', line 58
def rewrite(text, **options)
Rewrite.call(text, **options)
end
|
.sentiment(text, **options) ⇒ Object
50
51
52
|
# File 'lib/ruby_llm/text.rb', line 50
def sentiment(text, **options)
Sentiment.call(text, **options)
end
|
.summarize(text, **options) ⇒ Object
30
31
32
|
# File 'lib/ruby_llm/text.rb', line 30
def summarize(text, **options)
Summarize.call(text, **options)
end
|
.translate(text, **options) ⇒ Object
34
35
36
|
# File 'lib/ruby_llm/text.rb', line 34
def translate(text, **options)
Translate.call(text, **options)
end
|