Conversation
package.json
Outdated
| "repository": "https://github.com/humanloop/humanloop-node", | ||
| "main": "./index.js", | ||
| "types": "./index.d.ts", | ||
| "main": "./dist/index.js", |
| "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.
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.
those are deps packed by fern
| } | ||
| } | ||
|
|
||
| // ... existing code ... |
There was a problem hiding this comment.
i assume this is AI?
There was a problem hiding this comment.
(is this a sign that any other bits of code need cleanup/looking at?)
| * | ||
| * @param func - The function to wrap | ||
| * @param opentelemetryTracer - The OpenTelemetry tracer instance | ||
| * @param path - Optional span path |
There was a problem hiding this comment.
is this optional? path below is a non-optional string
| } | ||
|
|
||
| Object.keys(inputs!).forEach((inputKey) => { | ||
| if (!parameters.hasOwnProperty(inputKey)) { |
There was a problem hiding this comment.
is this the right way to check, or is "in" better?
jamesbaskerville
left a comment
There was a problem hiding this comment.
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.
same comment as python -- does string always make sense? Do we not send any other type of attr?
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.
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.
src/humanloop.client.ts
Outdated
| OpenAI?: any, | ||
| Anthropic?: any, | ||
| CohereAI?: any, |
There was a problem hiding this comment.
why this change ooc?
| version, | ||
| }: { | ||
| callable: InputsMessagesCallableType<I, M, O>; | ||
| public prompt<I, O>(args: { |
There was a problem hiding this comment.
These three should probably still have docstrings, though they can be a little less involved than previously
| "content" in funcOutput | ||
| ) { | ||
| outputMessage = | ||
| funcOutput as unknown as ChatMessage; |
| 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.
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.
so does this do nothing atm? What does this TODO mean?
| await new Promise((resolve) => setTimeout(resolve, 500)); | ||
| } | ||
| } while (stats.status !== "completed"); | ||
| console.log(stats.report); |
There was a problem hiding this comment.
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.
does this need to go in now?
| }); | ||
| } 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.
is this a linear ticket?
There was a problem hiding this comment.
df194c1 to
2838674
Compare
f663e59 to
dfe5cc9
Compare
Uh oh!
There was an error while loading. Please reload this page.