From 1d7619911444b55f4b6d6b14e47816c64feebf2d Mon Sep 17 00:00:00 2001 From: Sebastian Lobentanzer Date: Thu, 15 Aug 2024 17:40:39 +0200 Subject: [PATCH] fix: turn off deprecated correction by default (#196) * mention Claude in docs * switch correction default off --- biochatter/llm_connect.py | 14 +++++++------- docs/features/chat.md | 14 ++++++++++++++ 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/biochatter/llm_connect.py b/biochatter/llm_connect.py index 893b99ec..d4b2fc1b 100644 --- a/biochatter/llm_connect.py +++ b/biochatter/llm_connect.py @@ -77,7 +77,7 @@ def __init__( self, model_name: str, prompts: dict, - correct: bool = True, + correct: bool = False, split_correction: bool = False, use_ragagent_selector: bool = False, ): @@ -458,7 +458,7 @@ def __init__( self, model_name: str, prompts: dict, - correct: bool = True, + correct: bool = False, split_correction: bool = False, ): """ @@ -523,7 +523,7 @@ def __init__( base_url: str, prompts: dict, model_name: str = "auto", - correct: bool = True, + correct: bool = False, split_correction: bool = False, ): """ @@ -891,7 +891,7 @@ def __init__( base_url: str, prompts: dict, model_name: str = "llama3", - correct: bool = True, + correct: bool = False, split_correction: bool = False, ): """ @@ -1095,7 +1095,7 @@ def __init__( self, model_name: str, prompts: dict, - correct: bool = True, + correct: bool = False, split_correction: bool = False, ): """ @@ -1317,7 +1317,7 @@ def __init__( self, model_name: str, prompts: dict, - correct: bool = True, + correct: bool = False, split_correction: bool = False, ): """ @@ -1478,7 +1478,7 @@ def __init__( deployment_name: str, model_name: str, prompts: dict, - correct: bool = True, + correct: bool = False, split_correction: bool = False, version: Optional[str] = None, base_url: Optional[str] = None, diff --git a/docs/features/chat.md b/docs/features/chat.md index 31337547..9da94d7b 100644 --- a/docs/features/chat.md +++ b/docs/features/chat.md @@ -60,6 +60,20 @@ designate the `OPENAI_API_KEY` variable in your environment directly (`export OPENAI_API_KEY=sk-...`) by adding it to your shell configuration (e.g., the `zshrc`). +## Using Anthropic models (Claude) + +Similarly, to use an Anthropic model, you need a billable account with Anthropic +API access, and to set the `ANTHROPIC_API_KEY` variable in your environment. + +```python +from biochatter.llm_connect import AnthropicConversation + +conversation = AnthropicConversation( + model_name="claude-3-5-sonnet-20240620", + prompts={}, +) +``` + ## Multimodal models - Text and image We support multimodal queries in models that offer these capabilities after the