Skip to content

feat(examples): Add Go client example for PowerMem HTTP API#212

Merged
Teingi merged 4 commits into
oceanbase:mainfrom
cr7258:go-example
Jan 31, 2026
Merged

feat(examples): Add Go client example for PowerMem HTTP API#212
Teingi merged 4 commits into
oceanbase:mainfrom
cr7258:go-example

Conversation

@cr7258

@cr7258 cr7258 commented Jan 31, 2026

Copy link
Copy Markdown
Contributor

Summary

fixes: #179

This PR adds a simple, lightweight Go client example demonstrating how to integrate PowerMem's intelligent memory capabilities into Go applications.

Test

Test client:

go run .
============================================================
PowerMem Go Client Example
============================================================

Configuration:
  Base URL: http://localhost:8000
  API Key:  (not set)

----------------------------------------
1. Health Check
----------------------------------------
✓ Status: healthy
  Timestamp: 2026-01-31 06:35:01

----------------------------------------
2. Create Memory
----------------------------------------
✓ Created 3 memory(ies):
  [1] ID: 672691317066694656
      Content: Likes coffee
  [2] ID: 672691317075083264
      Content: Goes to Starbucks every morning
  [3] ID: 672691317079277568
      Content: Prefers latte

----------------------------------------
3. List Memories
----------------------------------------
✓ Found 5 memories (showing 5):
  [1] ID: 672687041741324288
      Content: Goes to Starbucks every morning
  [2] ID: 672687041749712896
      Content: Prefers latte
  [3] ID: 672691317066694656
      Content: Likes coffee
  [4] ID: 672691317075083264
      Content: Goes to Starbucks every morning
  [5] ID: 672691317079277568
      Content: Prefers latte

----------------------------------------
4. Search Memories
----------------------------------------
✓ Query: "What beverages does the user like?"
  Found 5 results:
  [1] Score: 0.6504
      ID: 672687041749712896
      Content: Prefers latte
  [2] Score: 0.6504
      ID: 672691317079277568
      Content: Prefers latte
  [3] Score: 0.6492
      ID: 672691317066694656
      Content: Likes coffee
  [4] Score: 0.4774
      ID: 672687041741324288
      Content: Goes to Starbucks every morning
  [5] Score: 0.4774
      ID: 672691317075083264
      Content: Goes to Starbucks every morning

----------------------------------------
5. Update Memory
----------------------------------------
✓ Updated memory ID: 672691317066694656
  New content: User loves espresso and visits Starbucks daily
  Updated at: 2026-01-31 06:35:08

----------------------------------------
6. Delete Memory
----------------------------------------
✓ Deleted memory ID: 672691317066694656

============================================================
✅ All examples completed successfully!
============================================================

@Teingi Teingi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Teingi Teingi merged commit 87ed5bc into oceanbase:main Jan 31, 2026
10 checks passed
@Teingi Teingi mentioned this pull request Jan 31, 2026
@Teingi Teingi self-assigned this Feb 10, 2026
@Teingi Teingi added this to the v1.0.0 milestone Feb 10, 2026
@Teingi Teingi added this to PowerMem Feb 10, 2026
@github-project-automation github-project-automation Bot moved this from Todo to Done in PowerMem Feb 10, 2026
@github-project-automation github-project-automation Bot moved this to Todo in PowerMem Feb 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[Feature]: Go Client Example for PowerMem HTTP API Server

2 participants