You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems that Anthropic is supported, but is AnthropicVertex not supported? When I implement it using AnthropicVertex, it results in an error. Please refer to the code below.
# copy from weave document https://weave-docs.wandb.ai/guides/integrations/anthropic#create-a-model-for-easier-experimentationimportweave# use the anthropic library as usualfromanthropicimportAnthropicVertexweave.init('your-project-name')
classJokerModel(weave.Model):
model: strtemperature: float@weave.op() #if commented out, the error will be gonedefpredict(self, topic): # Change to `predict`client=AnthropicVertex(region="us-central1", project_id="your-project-name")
message=client.messages.create(
max_tokens=1024,
messages=[
{
"role": "user",
"content": f"Tell me a joke about {topic}",
}
],
model=self.model,
temperature=self.temperature
)
returnmessage.content[0].textjoker=JokerModel(
model="claude-3-haiku@20240307",
temperature=0.1)
result=joker.predict("Chickens and Robots")
print(result)
TypeError: cannot pickle '_thread.RLock' object
I think this behavior is related to the following issue: #2830
The text was updated successfully, but these errors were encountered:
It seems that Anthropic is supported, but is AnthropicVertex not supported? When I implement it using AnthropicVertex, it results in an error. Please refer to the code below.
I think this behavior is related to the following issue: #2830
The text was updated successfully, but these errors were encountered: