Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correlation ID #40

Merged
merged 8 commits into from
Jul 21, 2024
Merged

Correlation ID #40

merged 8 commits into from
Jul 21, 2024

Conversation

davidkpiano
Copy link
Member

@davidkpiano davidkpiano commented Jul 21, 2024

Correlation IDs are now provided as part of the result from agent.generateText(…) and agent.streamText(…):

const result = await agent.generateText({
  prompt: 'Write me a song',
  correlationId: 'my-correlation-id',
  // ...
});

result.correlationId; // 'my-correlation-id'

These correlation IDs can be passed to feedback:

// ...

agent.addFeedback({
  reward: -1,
  correlationId: result.correlationId,
});

Changes to agent feedback (the AgentFeedback interface):

  • goal is now optional
  • observationId is now optional
  • correlationId has been added (optional)
  • reward has been added (optional)
  • attributes are now optional

@davidkpiano davidkpiano merged commit 8cc48d0 into main Jul 21, 2024
@github-actions github-actions bot mentioned this pull request Jul 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant