Skip to content

Commit

Permalink
default quickstart to gpt-4o-mini, add anthropic example
Browse files Browse the repository at this point in the history
  • Loading branch information
parkervg committed Oct 18, 2024
1 parent 903bd46 commit 7f5898f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,15 +160,16 @@ import pandas as pd
import blendsql
from blendsql.ingredients import LLMMap, LLMQA, LLMJoin
from blendsql.db import Pandas
from blendsql.models import TransformersLLM, OpenaiLLM
from blendsql.models import TransformersLLM, OpenaiLLM, AnthropicLLM

# Optionally set how many async calls to allow concurrently
# This depends on your OpenAI/Anthropic/etc. rate limits
blendsql.config.set_async_limit(10)

# Load model
model = OpenaiLLM("gpt-4o-mini") # If you have a .env present with OpenAI API keys
# model = TransformersLLM('Qwen/Qwen1.5-0.5B')
model = OpenaiLLM("gpt-4o-mini") # requires .env file with `OPENAI_API_KEY`
# model = AnthropicLLM("claude-3-haiku-20240307") # requires .env file with `ANTHROPIC_API_KEY`
# model = TransformersLLM('Qwen/Qwen1.5-0.5B') # run with any local Transformers model

# Prepare our local database
db = Pandas(
Expand Down
7 changes: 4 additions & 3 deletions docs/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,16 @@ import pandas as pd
import blendsql
from blendsql.ingredients import LLMMap, LLMQA, LLMJoin
from blendsql.db import Pandas
from blendsql.models import TransformersLLM, OpenaiLLM
from blendsql.models import TransformersLLM, OpenaiLLM, AnthropicLLM

# Optionally set how many async calls to allow concurrently
# This depends on your OpenAI/Anthropic/etc. rate limits
blendsql.config.set_async_limit(10)

# Load model
model = OpenaiLLM("gpt-4o-mini") # If you have a .env present with OpenAI API keys
# model = TransformersLLM('Qwen/Qwen1.5-0.5B')
model = OpenaiLLM("gpt-4o-mini") # requires .env file with `OPENAI_API_KEY`
# model = AnthropicLLM("claude-3-haiku-20240307") # requires .env file with `ANTHROPIC_API_KEY`
# model = TransformersLLM('Qwen/Qwen1.5-0.5B') # run with any local Transformers model

# Prepare our local database
db = Pandas(
Expand Down

0 comments on commit 7f5898f

Please sign in to comment.