Skip to content

Commit

Permalink
anthropic working
Browse files Browse the repository at this point in the history
  • Loading branch information
kyegomez committed Nov 8, 2023
1 parent 11b02a5 commit f74a4da
Show file tree
Hide file tree
Showing 8 changed files with 543 additions and 85 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
IMAGE_OF_FINANCIAL_DOC_URL = "bank_statement_2.jpg"

# Example usage
api_key = "" # Your actual API key here
api_key = "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" # Your actual API key here

# Initialize the OCR model
def ocr_model(img: str):
Expand All @@ -21,10 +21,8 @@ def ocr_model(img: str):

# Initialize the language flow
llm = OpenAIChat(
model_name="gpt-4-turbo",
openai_api_key=api_key,
temperature=0.5,
max_tokens=3000,
)

# Create a prompt for the language model
Expand Down
File renamed without changes
11 changes: 11 additions & 0 deletions playground/models/anthropic_example.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from swarms.models.anthropic import Anthropic


model = Anthropic(
anthropic_api_key=""
)


task = "Say hello to"

print(model(task))
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "swarms"
version = "2.0.7"
version = "2.0.8"
description = "Swarms - Pytorch"
license = "MIT"
authors = ["Kye Gomez <kye@apac.ai>"]
Expand Down
3 changes: 1 addition & 2 deletions swarms/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,9 @@

# from swarms.models.gpt4v import GPT4Vision
# from swarms.models.dalle3 import Dalle3

# from swarms.models.distilled_whisperx import DistilWhisperModel

# from swarms.models.fuyu import Fuyu # Not working, wait until they update

import sys

log_file = open("errors.txt", "w")
Expand Down

0 comments on commit f74a4da

Please sign in to comment.