Skip to content

Commit

Permalink
Release (#69)
Browse files Browse the repository at this point in the history
* Updated test_chat_completion and added test_anthropic. Updated tests/utils

* Updated tests/utils

* updated langchain test cases

* updated test_langchain

* updated test_image_generation

* Bugfix

* Bump version

* Cleanup logging (#56)

* Fix streaming bug (#57)

* Cleanup logging

* Fix streaming bug

* bump version

* add sdk name (#60)

* Bump trace-attributes (#62)

* add model for streaming

* Add model for streaming (#65)

* Release 1.2.13 (#55)

* Updated test_chat_completion and added test_anthropic. Updated tests/utils

* Updated tests/utils

* updated langchain test cases

* updated test_langchain

* updated test_image_generation

* Bugfix

* Bump version

---------

Co-authored-by: Ali Waleed <[email protected]>
Co-authored-by: MayuriS24 <[email protected]>
Co-authored-by: Rohit Kadhe <[email protected]>

* Bump version

* Release (#58)

* Updated test_chat_completion and added test_anthropic. Updated tests/utils

* Updated tests/utils

* updated langchain test cases

* updated test_langchain

* updated test_image_generation

* Bugfix

* Bump version

* Cleanup logging (#56)

* Fix streaming bug (#57)

* Cleanup logging

* Fix streaming bug

---------

Co-authored-by: Ali Waleed <[email protected]>
Co-authored-by: MayuriS24 <[email protected]>
Co-authored-by: Rohit Kadhe <[email protected]>

* Release (#59)

* Updated test_chat_completion and added test_anthropic. Updated tests/utils

* Updated tests/utils

* updated langchain test cases

* updated test_langchain

* updated test_image_generation

* Bugfix

* Bump version

* Cleanup logging (#56)

* Fix streaming bug (#57)

* Cleanup logging

* Fix streaming bug

* bump version

---------

Co-authored-by: Ali Waleed <[email protected]>
Co-authored-by: MayuriS24 <[email protected]>
Co-authored-by: Rohit Kadhe <[email protected]>

* Bump version

* Release (#61)

* Updated test_chat_completion and added test_anthropic. Updated tests/utils

* Updated tests/utils

* updated langchain test cases

* updated test_langchain

* updated test_image_generation

* Bugfix

* Bump version

* Cleanup logging (#56)

* Fix streaming bug (#57)

* Cleanup logging

* Fix streaming bug

* bump version

* add sdk name (#60)

---------

Co-authored-by: Ali Waleed <[email protected]>
Co-authored-by: MayuriS24 <[email protected]>
Co-authored-by: Rohit Kadhe <[email protected]>

* Bump version

* Release (#63)

* Updated test_chat_completion and added test_anthropic. Updated tests/utils

* Updated tests/utils

* updated langchain test cases

* updated test_langchain

* updated test_image_generation

* Bugfix

* Bump version

* Cleanup logging (#56)

* Fix streaming bug (#57)

* Cleanup logging

* Fix streaming bug

* bump version

* add sdk name (#60)

* Bump trace-attributes (#62)

---------

Co-authored-by: Ali Waleed <[email protected]>
Co-authored-by: MayuriS24 <[email protected]>
Co-authored-by: Rohit Kadhe <[email protected]>

* Bump version

* Release (#64)

* Updated test_chat_completion and added test_anthropic. Updated tests/utils

* Updated tests/utils

* updated langchain test cases

* updated test_langchain

* updated test_image_generation

* Bugfix

* Bump version

* Cleanup logging (#56)

* Fix streaming bug (#57)

* Cleanup logging

* Fix streaming bug

* bump version

* add sdk name (#60)

* Bump trace-attributes (#62)

* add model for streaming

---------

Co-authored-by: Ali Waleed <[email protected]>
Co-authored-by: MayuriS24 <[email protected]>
Co-authored-by: Rohit Kadhe <[email protected]>

---------

Co-authored-by: Ali Waleed <[email protected]>
Co-authored-by: MayuriS24 <[email protected]>
Co-authored-by: Rohit Kadhe <[email protected]>
Co-authored-by: karthikscale3 <[email protected]>

* Bugfix function calling (#66)

* fix function calling

* prompt token calculation fix

* Minor bugfix (#68)

* fix

* Fix

---------

Co-authored-by: Ali Waleed <[email protected]>
Co-authored-by: MayuriS24 <[email protected]>
Co-authored-by: Rohit Kadhe <[email protected]>
Co-authored-by: karthikscale3 <[email protected]>
  • Loading branch information
5 people authored Apr 5, 2024
1 parent 2ff4f5e commit 62ea48f
Showing 1 changed file with 7 additions and 18 deletions.
25 changes: 7 additions & 18 deletions src/langtrace_python_sdk/instrumentation/openai/patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,30 +281,19 @@ def handle_streaming_response(result, span, prompt_tokens, function_call=False):
}
),
)
if function_call is False:
span.set_attribute(
"llm.responses",
json.dumps(
{
"message": {
"role": "assistant",
"content": "".join(result_content),
}
}
),
)
else:
span.set_attribute(
"llm.responses",
json.dumps(
span.set_attribute(
"llm.responses",
json.dumps(
[
{
"message": {
"role": "assistant",
"content": "".join(result_content),
}
}
),
)
]
),
)
span.set_status(StatusCode.OK)
span.end()

Expand Down

0 comments on commit 62ea48f

Please sign in to comment.