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

fix: use go backend instead of python backend for example functions #1488

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

isahers1
Copy link
Contributor

@isahers1 isahers1 commented Feb 4, 2025

No description provided.

@@ -10,7 +10,7 @@ import {
Example,
ExampleCreate,
ExampleUpdate,
ExampleUpdateWithId,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just checking - was this exported publicly?

Also good to preserve naming scheme:

ExampleUpdateWithoutId

preparedCreate.attachments !== undefined
) {
allAttachments[preparedCreate.id] = preparedCreate.attachments;
let preparedCreateParams =
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this equivalent to what was there before?

If so, why change?

@@ -2676,113 +2697,164 @@ export class Client implements LangSmithTracingClientInterface {
return result["examples"] as ExampleSearch[];
}

public async createExample(update: ExampleCreate): Promise<Example>;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why overload?

await raiseForStatus(response, "create example");
const result = await response.json();
return result as Example;
return example;
}

public async createExamples(props: {
Copy link
Collaborator

Choose a reason for hiding this comment

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

This one should be an overload:

public async createExamples(props: Example[]);

public async createExamples(props: ...<current signature>)

@isahers1
Copy link
Contributor Author

isahers1 commented Feb 5, 2025

deprecate the old signatures

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.

2 participants