-
Notifications
You must be signed in to change notification settings - Fork 0
Decorators fixes latest #19
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
Conversation
package.json
Outdated
| "repository": "https://github.com/humanloop/humanloop-node", | ||
| "main": "./index.js", | ||
| "types": "./index.d.ts", | ||
| "main": "./dist/index.js", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
revert before merging
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
revert
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🦆
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
| "qs": "6.11.2", | ||
| "readable-stream": "^4.5.2", | ||
| "stable-hash": "0.0.4", | ||
| "url-join": "4.0.1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any of these ESM-only? (have we tested it's installable on customer-like environments that had issue with pmap?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
those are deps packed by fern
| } | ||
| } | ||
|
|
||
| // ... existing code ... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i assume this is AI?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(is this a sign that any other bits of code need cleanup/looking at?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
| * | ||
| * @param func - The function to wrap | ||
| * @param opentelemetryTracer - The OpenTelemetry tracer instance | ||
| * @param path - Optional span path |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this optional? path below is a non-optional string
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
| } | ||
|
|
||
| Object.keys(inputs!).forEach((inputKey) => { | ||
| if (!parameters.hasOwnProperty(inputKey)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this the right way to check, or is "in" better?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
jamesbaskerville
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
generally lgtm but needs some cleanup. utilities/ should be empty.
src/otel/exporter.ts
Outdated
| .filter(([_, value]) => value !== undefined) | ||
| .map(([key, value]) => ({ | ||
| key, | ||
| value: { stringValue: value!.toString() }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same comment as python -- does string always make sense? Do we not send any other type of attr?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
outdated & fixed
src/otel/exporter.ts
Outdated
| "X-Fern-SDK-Name": "humanloop", | ||
| "X-Fern-SDK-Version": SDK_VERSION, | ||
| }, | ||
| body: JSON.stringify(this.spanToProto(span)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: Does this match the OTLP spec for JSON spans? Slightly concerned there are differences that are unknown. We may be better off directly sending protos around and processing them as such.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/humanloop.client.ts
Outdated
| OpenAI?: any, | ||
| Anthropic?: any, | ||
| CohereAI?: any, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why this change ooc?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reverted
| version, | ||
| }: { | ||
| callable: InputsMessagesCallableType<I, M, O>; | ||
| public prompt<I, O>(args: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These three should probably still have docstrings, though they can be a little less involved than previously
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added
| "content" in funcOutput | ||
| ) { | ||
| outputMessage = | ||
| funcOutput as unknown as ChatMessage; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice
| console.log(`\n${CYAN}Navigate to your Evaluation:${RESET}\n${evaluation.url}\n`); | ||
| console.log( | ||
| `${CYAN}${type_.charAt(0).toUpperCase() + type_.slice(1)} Version ID: ${ | ||
| hlFile.versionId | ||
| }${RESET}`, | ||
| ); | ||
| console.log(`${CYAN}Run ID: ${runId}${RESET}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are these in console logs instead of process.stdout.write?
| // TODO: trigger run when updated API is available | ||
| console.log( | ||
| `${CYAN}\nRunning ${hlFile.name} over the Dataset ${hlDataset.name}${RESET}`, | ||
| ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so does this do nothing atm? What does this TODO mean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure, pre my changes
| await new Promise((resolve) => setTimeout(resolve, 500)); | ||
| } | ||
| } while (stats.status !== "completed"); | ||
| console.log(stats.report); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same q on process.stdout vs. console.log
| // TODO: Add back in with number valence on Evaluators | ||
| // improvementCheck: improvementCheck, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this need to go in now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no
| }); | ||
| } catch (error: any) { | ||
| // If the name exists, go and get it | ||
| // TODO: Update API GET to allow querying by name and file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this a linear ticket?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
df194c1 to
2838674
Compare
f663e59 to
dfe5cc9
Compare
Uh oh!
There was an error while loading. Please reload this page.