Skip to content

Commit

Permalink
Update version to b3 build
Browse files Browse the repository at this point in the history
  • Loading branch information
jamie256 committed Apr 17, 2024
1 parent dcbe5ff commit 82c9bf6
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.0.1.b2
current_version = 0.0.1.b3
tag = False
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\-(?P<release>[a-z]+)(?P<build>\d+))?
serialize =
Expand Down
6 changes: 4 additions & 2 deletions openllmtelemetry/instrument.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,10 @@ def instrument(
guard_api_key = whylabs_guard_api_key or os.environ.get("WHYLABS_GUARD_API_KEY")

if guard_endpoint is None or guard_api_key is None:
LOGGER.warning("Missing env variables for WHYLABS_GUARD_ENDPOINT, LOGGER or parameters "
"for `whylabs_guard_endpoint` and `whylabs_guard_api_key`, falling back to basic LLM tracing only")
LOGGER.warning(
"Missing env variables for WHYLABS_GUARD_ENDPOINT, LOGGER or parameters "
"for `whylabs_guard_endpoint` and `whylabs_guard_api_key`, falling back to basic LLM tracing only"
)
secure_api = None
else:
secure_api = WhyLabsSecureApi(
Expand Down
3 changes: 1 addition & 2 deletions openllmtelemetry/instrumentation/bedrock/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,11 @@ def _set_amazon_titan_span_attributes(span, request_body, response_body):
if should_send_prompts():
_set_span_attribute(span, f"{SpanAttributes.LLM_PROMPTS}.0.user", request_body.get("inputText"))
contents = response_body.get("results")
_set_span_attribute(span, f"{SpanAttributes.LLM_COMPLETIONS}.0.content", contents[0].get('outputText') if contents else "")
_set_span_attribute(span, f"{SpanAttributes.LLM_COMPLETIONS}.0.content", contents[0].get("outputText") if contents else "")
except Exception as ex: # pylint: disable=broad-except
LOGGER.warning(f"Failed to set input attributes for openai span, error:{str(ex)}")



def _set_cohere_span_attributes(span, request_body, response_body):
_set_span_attribute(span, SpanAttributes.LLM_REQUEST_TYPE, LLMRequestTypeValues.COMPLETION.value)
_set_span_attribute(span, SpanAttributes.LLM_TOP_P, request_body.get("p"))
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "OpenLLMTelemetry"
version = "0.0.1.b2"
version = "0.0.1.b3"
description = "End-to-end observability with built-in security guardrails."
authors = ["WhyLabs.ai <[email protected]>"]
license = "Apache-2.0"
Expand Down

0 comments on commit 82c9bf6

Please sign in to comment.