From e1407400f20ad6787c1cacd8687df6e293810397 Mon Sep 17 00:00:00 2001 From: abhijitjavelin Date: Mon, 7 Apr 2025 14:50:14 +0530 Subject: [PATCH 1/3] fix: remove duplicate event register. merge issue --- README.md | 32 ++++++++++++++++---------------- javelin_sdk/client.py | 4 ---- 2 files changed, 16 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index b235a60..f04b957 100644 --- a/README.md +++ b/README.md @@ -70,32 +70,32 @@ pip install dist/javelin_sdk--py3-none-any.whl Javelin provides universal endpoints that allow you to use a consistent interface across different LLM providers. Here are the main patterns: #### Azure OpenAI -- [Basic Azure OpenAI integration](examples/azure-openai/azure-universal.py) -- [Universal endpoint implementation](examples/azure-openai/javelin_azureopenai_univ_endpoint.py) -- [OpenAI-compatible interface](examples/azure-openai/openai_compatible_univ_azure.py) +- [Basic Azure OpenAI integration](https://github.com/getjavelin/javelin-python/blob/main/examples/azure-openai/azure-universal.py) +- [Universal endpoint implementation](https://github.com/getjavelin/javelin-python/blob/main/examples/azure-openai/javelin_azureopenai_univ_endpoint.py) +- [OpenAI-compatible interface](https://github.com/getjavelin/javelin-python/blob/main/examples/azure-openai/openai_compatible_univ_azure.py) #### Bedrock -- [Basic Bedrock integration](examples/bedrock/bedrock_client_universal.py) -- [Universal endpoint implementation](examples/bedrock/javelin_bedrock_univ_endpoint.py) -- [OpenAI-compatible interface](examples/bedrock/openai_compatible_univ_bedrock.py) +- [Basic Bedrock integration](https://github.com/getjavelin/javelin-python/blob/main/examples/bedrock/bedrock_client_universal.py) +- [Universal endpoint implementation](https://github.com/getjavelin/javelin-python/blob/main/examples/bedrock/javelin_bedrock_univ_endpoint.py) +- [OpenAI-compatible interface](https://github.com/getjavelin/javelin-python/blob/main/examples/bedrock/openai_compatible_univ_bedrock.py) #### Gemini -- [Basic Gemini integration](examples/gemini/gemini-universal.py) -- [Universal endpoint implementation](examples/gemini/javelin_gemini_univ_endpoint.py) -- [OpenAI-compatible interface](examples/gemini/openai_compatible_univ_gemini.py) +- [Basic Gemini integration](https://github.com/getjavelin/javelin-python/blob/main/examples/gemini/gemini-universal.py) +- [Universal endpoint implementation](https://github.com/getjavelin/javelin-python/blob/main/examples/gemini/javelin_gemini_univ_endpoint.py) +- [OpenAI-compatible interface](https://github.com/getjavelin/javelin-python/blob/main/examples/gemini/openai_compatible_univ_gemini.py) ### Agent Examples -- [CrewAI integration](examples/agents/crewai_javelin.ipynb) -- [LangGraph integration](examples/agents/langgraph_javelin.ipynb) +- [CrewAI integration](https://github.com/getjavelin/javelin-python/blob/main/examples/agents/crewai_javelin.ipynb) +- [LangGraph integration](https://github.com/getjavelin/javelin-python/blob/main/examples/agents/langgraph_javelin.ipynb) ### Basic Examples -- [Asynchronous example](examples/route_examples/aexample.py) -- [Synchronous example](examples/route_examples/example.py) -- [Drop-in replacement example](examples/route_examples/drop_in_replacement.py) +- [Asynchronous example](https://github.com/getjavelin/javelin-python/blob/main/examples/route_examples/aexample.py) +- [Synchronous example](https://github.com/getjavelin/javelin-python/blob/main/examples/route_examples/example.py) +- [Drop-in replacement example](https://github.com/getjavelin/javelin-python/blob/main/examples/route_examples/drop_in_replacement.py) ### Advanced Examples -- [Document processing](examples/gemini/document_processing.py) -- [RAG implementation](examples/rag/javelin_rag_embeddings_demo.ipynb) +- [Document processing](https://github.com/getjavelin/javelin-python/blob/main/examples/gemini/document_processing.py) +- [RAG implementation](https://github.com/getjavelin/javelin-python/blob/main/examples/rag/javelin_rag_embeddings_demo.ipynb) ## Additional Integration Patterns diff --git a/javelin_sdk/client.py b/javelin_sdk/client.py index d2cab80..ee216de 100644 --- a/javelin_sdk/client.py +++ b/javelin_sdk/client.py @@ -883,10 +883,6 @@ def bedrock_after_call(**kwargs): # self.bedrock_runtime_client.meta.events.register(event_name_before_call, debug_before_call) # self.bedrock_runtime_client.meta.events.register(event_name_after_call, debug_after_call) - for op in self.BEDROCK_RUNTIME_OPERATIONS: - event_name = f"before-send.bedrock-runtime.{op}" - self.bedrock_runtime_client.meta.events.register(event_name, add_custom_headers) - self.bedrock_runtime_client.meta.events.register(event_name, override_endpoint_url) def _prepare_request(self, request: Request) -> tuple: url = self._construct_url( From fe95e916d29dd19c4535be6c3968508e320b2245 Mon Sep 17 00:00:00 2001 From: abhijitjavelin Date: Mon, 7 Apr 2025 14:57:16 +0530 Subject: [PATCH 2/3] fix: update readme --- README.md | 50 ++++++++++++++++++++++++++++---------------------- 1 file changed, 28 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index f04b957..cd23208 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ For local development, Please change `version = "RELEASE_VERSION"` with any sema ### Installation ```python - pip install javelin_sdk + pip install javelin-sdk ``` ### Quick Start Guide @@ -56,7 +56,7 @@ poetry install ```bash # Uninstall any existing version -pip uninstall javelin_sdk -y +pip uninstall javelin-sdk -y # Build the package poetry build @@ -69,33 +69,39 @@ pip install dist/javelin_sdk--py3-none-any.whl Javelin provides universal endpoints that allow you to use a consistent interface across different LLM providers. Here are the main patterns: -#### Azure OpenAI -- [Basic Azure OpenAI integration](https://github.com/getjavelin/javelin-python/blob/main/examples/azure-openai/azure-universal.py) -- [Universal endpoint implementation](https://github.com/getjavelin/javelin-python/blob/main/examples/azure-openai/javelin_azureopenai_univ_endpoint.py) -- [OpenAI-compatible interface](https://github.com/getjavelin/javelin-python/blob/main/examples/azure-openai/openai_compatible_univ_azure.py) +### Azure OpenAI -#### Bedrock -- [Basic Bedrock integration](https://github.com/getjavelin/javelin-python/blob/main/examples/bedrock/bedrock_client_universal.py) -- [Universal endpoint implementation](https://github.com/getjavelin/javelin-python/blob/main/examples/bedrock/javelin_bedrock_univ_endpoint.py) -- [OpenAI-compatible interface](https://github.com/getjavelin/javelin-python/blob/main/examples/bedrock/openai_compatible_univ_bedrock.py) +- [Basic Azure OpenAI integration](@https://github.com/getjavelin/javelin-python/examples/azure-openai/azure-universal.py) +- [Universal endpoint implementation](@https://github.com/getjavelin/javelin-python/examples/azure-openai/javelin_azureopenai_univ_endpoint.py) +- [OpenAI-compatible interface](@https://github.com/getjavelin/javelin-python/examples/azure-openai/openai_compatible_univ_azure.py) -#### Gemini -- [Basic Gemini integration](https://github.com/getjavelin/javelin-python/blob/main/examples/gemini/gemini-universal.py) -- [Universal endpoint implementation](https://github.com/getjavelin/javelin-python/blob/main/examples/gemini/javelin_gemini_univ_endpoint.py) -- [OpenAI-compatible interface](https://github.com/getjavelin/javelin-python/blob/main/examples/gemini/openai_compatible_univ_gemini.py) +### Bedrock -### Agent Examples -- [CrewAI integration](https://github.com/getjavelin/javelin-python/blob/main/examples/agents/crewai_javelin.ipynb) -- [LangGraph integration](https://github.com/getjavelin/javelin-python/blob/main/examples/agents/langgraph_javelin.ipynb) +- [Basic Bedrock integration](@https://github.com/getjavelin/javelin-python/examples/bedrock/bedrock_client_universal.py) +- [Universal endpoint implementation](@https://github.com/getjavelin/javelin-python/examples/bedrock/javelin_bedrock_univ_endpoint.py) +- [OpenAI-compatible interface](@https://github.com/getjavelin/javelin-python/examples/bedrock/openai_compatible_univ_bedrock.py) + +### Gemini + +- [Basic Gemini integration](@https://github.com/getjavelin/javelin-python/examples/gemini/gemini-universal.py) +- [Universal endpoint implementation](@https://github.com/getjavelin/javelin-python/examples/gemini/javelin_gemini_univ_endpoint.py) +- [OpenAI-compatible interface](@https://github.com/getjavelin/javelin-python/examples/gemini/openai_compatible_univ_gemini.py) ### Basic Examples -- [Asynchronous example](https://github.com/getjavelin/javelin-python/blob/main/examples/route_examples/aexample.py) -- [Synchronous example](https://github.com/getjavelin/javelin-python/blob/main/examples/route_examples/example.py) -- [Drop-in replacement example](https://github.com/getjavelin/javelin-python/blob/main/examples/route_examples/drop_in_replacement.py) + +- [Asynchronous example](@https://github.com/getjavelin/javelin-python/examples/route_examples/aexample.py) +- [Synchronous example](@https://github.com/getjavelin/javelin-python/examples/route_examples/example.py) +- [Drop-in replacement example](@https://github.com/getjavelin/javelin-python/examples/route_examples/drop_in_replacement.py) ### Advanced Examples -- [Document processing](https://github.com/getjavelin/javelin-python/blob/main/examples/gemini/document_processing.py) -- [RAG implementation](https://github.com/getjavelin/javelin-python/blob/main/examples/rag/javelin_rag_embeddings_demo.ipynb) + +- [Document processing](@https://github.com/getjavelin/javelin-python/examples/gemini/document_processing.py) +- [RAG implementation](@https://github.com/getjavelin/javelin-python/examples/rag/javelin_rag_embeddings_demo.ipynb) + +### Agent Examples + +- [CrewAI integration](@https://github.com/getjavelin/javelin-python/examples/agents/crewai_javelin.ipynb) +- [LangGraph integration](@https://github.com/getjavelin/javelin-python/examples/agents/langgraph_javelin.ipynb) ## Additional Integration Patterns From e0d3ab441e61494418349b89d4ee6587f98441d8 Mon Sep 17 00:00:00 2001 From: abhijitjavelin Date: Mon, 7 Apr 2025 15:05:05 +0530 Subject: [PATCH 3/3] fix: update readme --- README.md | 46 ++++++++++++++++++++-------------------------- 1 file changed, 20 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index cd23208..83401ec 100644 --- a/README.md +++ b/README.md @@ -69,39 +69,33 @@ pip install dist/javelin_sdk--py3-none-any.whl Javelin provides universal endpoints that allow you to use a consistent interface across different LLM providers. Here are the main patterns: -### Azure OpenAI +#### Azure OpenAI +- [Basic Azure OpenAI integration](https://github.com/getjavelin/javelin-python/blob/main/examples/azure-openai/azure-universal.py) +- [Universal endpoint implementation](https://github.com/getjavelin/javelin-python/blob/main/examples/azure-openai/javelin_azureopenai_univ_endpoint.py) +- [OpenAI-compatible interface](https://github.com/getjavelin/javelin-python/blob/main/examples/azure-openai/openai_compatible_univ_azure.py) -- [Basic Azure OpenAI integration](@https://github.com/getjavelin/javelin-python/examples/azure-openai/azure-universal.py) -- [Universal endpoint implementation](@https://github.com/getjavelin/javelin-python/examples/azure-openai/javelin_azureopenai_univ_endpoint.py) -- [OpenAI-compatible interface](@https://github.com/getjavelin/javelin-python/examples/azure-openai/openai_compatible_univ_azure.py) +#### Bedrock +- [Basic Bedrock integration](https://github.com/getjavelin/javelin-python/blob/main/examples/bedrock/bedrock_client_universal.py) +- [Universal endpoint implementation](https://github.com/getjavelin/javelin-python/blob/main/examples/bedrock/javelin_bedrock_univ_endpoint.py) +- [OpenAI-compatible interface](https://github.com/getjavelin/javelin-python/blob/main/examples/bedrock/openai_compatible_univ_bedrock.py) -### Bedrock +#### Gemini +- [Basic Gemini integration](https://github.com/getjavelin/javelin-python/blob/main/examples/gemini/gemini-universal.py) +- [Universal endpoint implementation](https://github.com/getjavelin/javelin-python/blob/main/examples/gemini/javelin_gemini_univ_endpoint.py) +- [OpenAI-compatible interface](https://github.com/getjavelin/javelin-python/blob/main/examples/gemini/openai_compatible_univ_gemini.py) -- [Basic Bedrock integration](@https://github.com/getjavelin/javelin-python/examples/bedrock/bedrock_client_universal.py) -- [Universal endpoint implementation](@https://github.com/getjavelin/javelin-python/examples/bedrock/javelin_bedrock_univ_endpoint.py) -- [OpenAI-compatible interface](@https://github.com/getjavelin/javelin-python/examples/bedrock/openai_compatible_univ_bedrock.py) - -### Gemini - -- [Basic Gemini integration](@https://github.com/getjavelin/javelin-python/examples/gemini/gemini-universal.py) -- [Universal endpoint implementation](@https://github.com/getjavelin/javelin-python/examples/gemini/javelin_gemini_univ_endpoint.py) -- [OpenAI-compatible interface](@https://github.com/getjavelin/javelin-python/examples/gemini/openai_compatible_univ_gemini.py) +### Agent Examples +- [CrewAI integration](https://github.com/getjavelin/javelin-python/blob/main/examples/agents/crewai_javelin.ipynb) +- [LangGraph integration](https://github.com/getjavelin/javelin-python/blob/main/examples/agents/langgraph_javelin.ipynb) ### Basic Examples - -- [Asynchronous example](@https://github.com/getjavelin/javelin-python/examples/route_examples/aexample.py) -- [Synchronous example](@https://github.com/getjavelin/javelin-python/examples/route_examples/example.py) -- [Drop-in replacement example](@https://github.com/getjavelin/javelin-python/examples/route_examples/drop_in_replacement.py) +- [Asynchronous example](https://github.com/getjavelin/javelin-python/blob/main/examples/route_examples/aexample.py) +- [Synchronous example](https://github.com/getjavelin/javelin-python/blob/main/examples/route_examples/example.py) +- [Drop-in replacement example](https://github.com/getjavelin/javelin-python/blob/main/examples/route_examples/drop_in_replacement.py) ### Advanced Examples - -- [Document processing](@https://github.com/getjavelin/javelin-python/examples/gemini/document_processing.py) -- [RAG implementation](@https://github.com/getjavelin/javelin-python/examples/rag/javelin_rag_embeddings_demo.ipynb) - -### Agent Examples - -- [CrewAI integration](@https://github.com/getjavelin/javelin-python/examples/agents/crewai_javelin.ipynb) -- [LangGraph integration](@https://github.com/getjavelin/javelin-python/examples/agents/langgraph_javelin.ipynb) +- [Document processing](https://github.com/getjavelin/javelin-python/blob/main/examples/gemini/document_processing.py) +- [RAG implementation](https://github.com/getjavelin/javelin-python/blob/main/examples/rag/javelin_rag_embeddings_demo.ipynb) ## Additional Integration Patterns