You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+31-17Lines changed: 31 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# SentimentInsights
2
2
3
-
**SentimentInsights** is a Ruby gem for extracting sentiment, key phrases, and named entities from survey responses or free-form textual data. It offers a plug-and-play interface to different NLP providers, including OpenAI and AWS.
3
+
**SentimentInsights** is a Ruby gem for extracting sentiment, key phrases, and named entities from survey responses or free-form textual data. It offers a plug-and-play interface to different NLP providers, including OpenAI, Claude AI, and AWS.
4
4
5
5
---
6
6
@@ -43,7 +43,7 @@ gem install sentiment_insights
43
43
44
44
## Configuration
45
45
46
-
Configure the provider and (if using OpenAI or AWS) your API key:
46
+
Configure the provider and (if using OpenAI, Claude AI, or AWS) your API key:
47
47
48
48
```ruby
49
49
require'sentiment_insights'
@@ -54,6 +54,12 @@ SentimentInsights.configure do |config|
|`question`| String | Context question to guide entity extraction | OpenAI, Claude only|
280
+
|`prompt`| String | Custom instructions for entity extraction | OpenAI, Claude only|
274
281
275
282
#### 📾 Sample Output
276
283
@@ -310,7 +317,7 @@ result = insight.extract(
310
317
311
318
## Provider Options & Custom Prompts
312
319
313
-
> ⚠️ All advanced options (`question`, `prompt`, `key_phrase_prompt`, `sentiment_prompt`, `batch_size`) apply only to the `:openai`provider.
320
+
> ⚠️ All advanced options (`question`, `prompt`, `key_phrase_prompt`, `sentiment_prompt`, `batch_size`) apply only to the `:openai`and `:claude` providers.
314
321
> They are safely ignored for `:aws` and `:sentimental`.
315
322
316
323
---
@@ -323,6 +330,12 @@ result = insight.extract(
323
330
OPENAI_API_KEY=your_openai_key_here
324
331
```
325
332
333
+
### Claude AI
334
+
335
+
```bash
336
+
CLAUDE_API_KEY=your_claude_key_here
337
+
```
338
+
326
339
### AWS Comprehend
327
340
328
341
```bash
@@ -373,6 +386,7 @@ Pull requests welcome! Please open an issue to discuss major changes first.
0 commit comments