Activity Feeds V3 is in closed alpha — do not use it in production (just yet).

Processors

Activity Processors

Activity processors enable you to do additional processing on activities after they are posted.

Activity Processors

The activity processors allow you to add data to an activity when it’s added. The most common use case for this is topic analysis using AI.

const response = await serverClient.feeds.createFeedGroup({
  id: "myid",
  activity_processors: [{ type: "image_topic" }, { type: "text_topic" }],
});

This interest tags data can now be used in ranking etc.

Topic Analyzer

The topic analyzer uses AI to set the topics based on the content of the text and images.

You can enable it like this:

const response = await serverClient.feeds.createFeedGroup({
  id: "myid",
  activity_processors: [{ type: "topic" }],
});

Whenever a new activity is posted, it will automatically be enriched with topics:

const response = await feed.addActivity({
  type: "post",
  text: "check out my 10 fitness tips for reducing lower back pain",
});

console.log(response.activity.interest_tags); // ["fitness", "health", "tips"]
const response = await client.feeds.addActivity({
  feeds: ["user:1"],
  type: "post",
  text: "check out my 10 fitness tips for reducing lower back pain",
  user_id: "<user id>",
});

console.log(response.activity.interest_tags); // ["fitness", "health", "tips"]
feedIdentifier := fmt.Sprintf("%s:%s", userFeedType, testUserID)
response, err := feedsClient.AddActivity(ctx, &getstream.AddActivityRequest{
	Type:   "post",
	Feeds:  []string{feedIdentifier},
	Text:   getstream.PtrTo("This is a test activity from Go SDK"),
	UserID: &testUserID,
	Custom: map[string]interface{}{
		"test_field": "test_value",
		"timestamp":  time.Now().Unix(),
	},
})
AddActivityRequest activity =
    AddActivityRequest.builder()
        .type("post")
        .feeds(List.of(testFeedId))
        .text("This is a test activity from Java SDK")
        .userID(testUserId)
        .build();

AddActivityResponse response = feeds.addActivity(activity).execute().getData();
$activity = new GeneratedModels\AddActivityRequest(
    type: 'post',
    feeds: [$this->testFeed->getFeedIdentifier()],
    text: 'This is a test activity from PHP SDK',
    userID: $this->testUserId,
    custom: (object)[
        'test_field' => 'test_value',
        'timestamp' => time()
    ]
);
$response = $this->feedsV3Client->addActivity($activity);
var activity = new AddActivityRequest
{
    Type = "post",
    Text = "This is a test activity from .NET SDK",
    UserID = _testUserId,
    Feeds = new List<string> { $"user:{_testFeedId}" }
};
var response = await _feedsV3Client.AddActivityAsync(activity);
response = self.client.feeds.add_activity(
    type="post",
    feeds=[self.test_feed.get_feed_identifier()],
    text="This is a test activity from Python SDK",
    user_id=self.test_user_id,
    custom={
        "test_field": "test_value",
        "timestamp": int(datetime.now().timestamp()),
    },
)
© Getstream.io, Inc. All Rights Reserved.