Skip to content

Commit

Permalink
Merge pull request #1014 from ai-1st/master
Browse files Browse the repository at this point in the history
Fix AWS Bedrock invocation; create output folder in cli.py if it doesn't exist
  • Loading branch information
assafelovic authored Dec 14, 2024
2 parents 40a6c40 + 10e04a2 commit c7b18fd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import argparse
from argparse import RawTextHelpFormatter
from uuid import uuid4
import os

from dotenv import load_dotenv

Expand Down Expand Up @@ -92,6 +93,7 @@ async def main(args):

# Write the report to a file
artifact_filepath = f"outputs/{uuid4()}.md"
os.makedirs("outputs", exist_ok=True)
with open(artifact_filepath, "w") as f:
f.write(report)

Expand Down
2 changes: 1 addition & 1 deletion gpt_researcher/llm_provider/generic/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def from_provider(cls, provider: str, **kwargs: Any):

if "model" in kwargs or "model_name" in kwargs:
model_id = kwargs.pop("model", None) or kwargs.pop("model_name", None)
kwargs = {"model_id": model_id, **kwargs}
kwargs = {"model_id": model_id, "model_kwargs": kwargs}
llm = ChatBedrock(**kwargs)
elif provider == "dashscope":
_check_pkg("langchain_dashscope")
Expand Down

0 comments on commit c7b18fd

Please sign in to comment.