Skip to content

generator: anthropic #263

Closed
Closed

Description

@leondz
No description provided.

Activity

  1. added
    generatorsInterfaces with LLMs
    new pluginDescribes an entirely new probe, detector, generator or harness
    on Jul 26, 2023
  2. ishaan-jaff commented on Sep 22, 2023

    @ishaan-jaff

    Hi @leondz I believe we can help with this issue. I’m the maintainer of LiteLLM https://github.com/BerriAI/litellm

    TLDR:
    We allow you to use any LLM as a drop in replacement for gpt-3.5-turbo.
    If you don't have access to the LLM you can use the LiteLLM proxy to make requests to the LLM

    You can use LiteLLM in the following ways:

    With your own API KEY:

    This calls the provider API directly

    from litellm import completion
    import os
    ## set ENV variables 
    os.environ["OPENAI_API_KEY"] = "your-key" # 
    os.environ["COHERE_API_KEY"] = "your-key" # 
    
    messages = [{ "content": "Hello, how are you?","role": "user"}]
    
    # openai call
    response = completion(model="gpt-3.5-turbo", messages=messages)
    
    # cohere call
    response = completion(model="command-nightly", messages=messages)

    Using the LiteLLM Proxy with a LiteLLM Key

    this is great if you don’t have access to claude but want to use the open source LiteLLM proxy to access claude

    from litellm import completion
    import os
    
    ## set ENV variables 
    os.environ["OPENAI_API_KEY"] = "sk-litellm-5b46387675a944d2" # [OPTIONAL] replace with your openai key
    os.environ["COHERE_API_KEY"] = "sk-litellm-5b46387675a944d2" # [OPTIONAL] replace with your cohere key
    
    messages = [{ "content": "Hello, how are you?","role": "user"}]
    
    # openai call
    response = completion(model="gpt-3.5-turbo", messages=messages)
    
    # cohere call
    response = completion(model="command-nightly", messages=messages)
  3. leondz commented on Mar 24, 2024

    @leondz
    CollaboratorAuthor

    hey @ishaan-jaff! thanks for this request. a dedicate LiteLLM PR has been submitted (#572) - your feedback is welcome

  4. fabriziorocco commented on May 14, 2024

    @fabriziorocco
    Contributor

    Hey, any plan to implement a generator for Claude3?
    Here's the API docs for Bedrock https://docs.anthropic.com/en/api/claude-on-amazon-bedrock

  5. github-actions commented on Sep 23, 2025

    @github-actions
    Contributor

    This issue has been automatically marked as stale because it has not had recent activity. If you are still interested in this issue, please respond to keep it open. Thank you!

  6. added
    stalelow activity issue that may be auto-closed if there are no more updates
    on Sep 23, 2025
  7. added
    dontautocloseThe `stale` workflow should not mark this
    and removed
    stalelow activity issue that may be auto-closed if there are no more updates
    on Sep 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    dontautocloseThe `stale` workflow should not mark thisgeneratorsInterfaces with LLMsgood first issueGood for newcomersnew pluginDescribes an entirely new probe, detector, generator or harness

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions