Skip to content

Commit

Permalink
Add missing attributes for new version of @langtrase/trace-attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
legrego committed Nov 18, 2024
1 parent 9676052 commit 978c692
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ export function createObservableFromHttpResponse(
}

return new Observable<string>((subscriber) => {
const parser = createParser((event) => {
if (event.type === 'event') {
const parser = createParser({
onEvent: (event) => {
subscriber.next(event.data);
}
},
});

const readStream = async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ export function withLangtraceChatCompleteSpan<T extends ChatEvent>({
'http.max.retries': 0,
// dummy URL
'url.full': 'http://localhost:3000/chat/completions',
'url.path': '/chat/completions',
'http.timeout': 120 * 1000,
'gen_ai.operation.name': 'chat_completion',
'gen_ai.request.model': model,
'llm.prompts': JSON.stringify(
messages.map((message) => ({
role: message.message.role,
Expand Down

0 comments on commit 978c692

Please sign in to comment.