acsresearch / interlab

MIT License
17 stars 2 forks source link

Bug in AnthropicEngine.aquery #20

Closed jas-ho closed 1 year ago

jas-ho commented 1 year ago

raises AttributeError: 'Anthropic' object has no attribute 'acompletion'

File ~/dev/acs/interlab/interlab/llm/engines.py:211, in AnthropicEngine.aquery(self, prompt, max_tokens)
    209 with Context(f"Anthropic {self.model}", inputs=inputs) as c:
    210     async with _anthropic_semaphore:
--> 211         r = await self.client.acompletion(
    212             prompt=f"{anthropic.HUMAN_PROMPT} {prompt}{anthropic.AI_PROMPT}",
    213             stop_sequences=[anthropic.HUMAN_PROMPT],
    214             max_tokens_to_sample=max_tokens,
    215             temperature=self.temperature,
    216             model=self.model,
    217         )
    218         d = r["completion"].strip()
    219         c.set_result(d)

AttributeError: 'Anthropic' object has no attribute 'acompletion'
jas-ho commented 1 year ago

we get an analogous error for AnthropicEngine.query