Skip to content

Commit

Permalink
Merge branch main into brian/converse-api-integration
Browse files Browse the repository at this point in the history
  • Loading branch information
brianandres2 committed Feb 20, 2025
2 parents 70ece1d + 13e5ae7 commit 703777a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 15 deletions.
20 changes: 6 additions & 14 deletions src/e84_geoai_common/llm/models/nova.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@

# https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids.html#model-ids-arns
NOVA_BEDROCK_MODEL_IDS = {
"Nova Canvas": "us.amazon.nova-canvas-v1:0",
"Nova Lite": "us.amazon.nova-lite-v1:0",
"Nova Micro": "us.amazon.nova-micro-v1:0",
"Nova Pro": "us.amazon.nova-pro-v1:0",
"Nova Reel": "us.amazon.nova-reel-v1:0",
"Nova Canvas": "amazon.nova-canvas-v1:0",
"Nova Lite": "amazon.nova-lite-v1:0",
"Nova Micro": "amazon.nova-micro-v1:0",
"Nova Pro": "amazon.nova-pro-v1:0",
"Nova Reel": "amazon.nova-reel-v1:0",
}


Expand Down Expand Up @@ -237,8 +237,6 @@ def prompt(
raise ValueError(msg)
request = self._create_request(messages, inference_cfg)
response = self.invoke_model_with_request(request)
# log.info(response.output)
log.info(response)
return response.output.message.to_llm_message(inference_cfg)

@timed_function
Expand All @@ -265,13 +263,7 @@ def invoke_model_with_request(self, request: NovaInvokeLLMRequest) -> NovaRespon

# llm = BedrockNovaLLM()
# config = LLMInferenceConfig()
# resp = llm.prompt(
# messages=[
# LLMMessage(content="repeat 'hello' backwards"),
# LLMMessage(role="assistant", content="what is 10+10?")
# ],
# inference_cfg=config
# )
# resp = llm.prompt(messages=[LLMMessage(content="hello")], inference_cfg=config)
# print(resp.model_dump_json(indent=2))


Expand Down
1 change: 0 additions & 1 deletion src/e84_geoai_common/llm/tests/mock_bedrock.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
USE_REAL_BEDROCK_CLIENT = os.getenv("USE_REAL_BEDROCK_CLIENT") == "true"



def _string_to_streaming_body(string_data: str) -> StreamingBody:
bytes_data = string_data.encode("utf-8")
stream = BytesIO(bytes_data)
Expand Down

0 comments on commit 703777a

Please sign in to comment.