Skip to content

Commit

Permalink
Bugfixes for Wikipedia extract and search commands (#242)
Browse files Browse the repository at this point in the history
  • Loading branch information
caufieldjh authored Oct 18, 2023
2 parents 40f2182 + 7c4d424 commit 3f1202a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/ontogpt/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ def wikipedia_extract(model, article, template, output, output_format, show_prom
model_source = selectmodel["provider"]

if model_source == "OpenAI":
ke = SPIRESEngine(template, **kwargs)
ke = SPIRESEngine(template=template, model=model, **kwargs)
if settings.cache_db:
ke.client.cache_db_path = settings.cache_db
if settings.skip_annotators:
Expand Down Expand Up @@ -603,7 +603,7 @@ def wikipedia_search(model, topic, keyword, template, output, output_format, sho
model_source = selectmodel["provider"]

if model_source == "OpenAI":
ke = SPIRESEngine(template, **kwargs)
ke = SPIRESEngine(template=template, model=model, **kwargs)

elif model_source == "GPT4All":
model_name = selectmodel["alternative_names"][0]
Expand Down
2 changes: 1 addition & 1 deletion src/ontogpt/clients/wikipedia_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class WikipediaClient:

def text(self, title: str) -> str:
"""Get the text of a an article."""
wiki = wikipediaapi.Wikipedia(self.language)
wiki = wikipediaapi.Wikipedia("ontogpt", self.language)
page = wiki.page(title)

if page.exists():
Expand Down

0 comments on commit 3f1202a

Please sign in to comment.