Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

weave has no attribuite 'type' #211

Open
Jayleelwj opened this issue Oct 15, 2024 · 0 comments
Open

weave has no attribuite 'type' #211

Jayleelwj opened this issue Oct 15, 2024 · 0 comments

Comments

@Jayleelwj
Copy link

Traceback (most recent call last):
File "d:\github_code\openui\backend\openui\eval\evaluate.py", line 38, in
@weave.type()
^^^^^^^^^^
AttributeError: module 'weave' has no attribute 'type'

base_dir = Path(__file__).parent / "datasets"

@weave.type()
class EvaluateQualityModel(Model):
    system_message: str
    model_name: str = "gpt-4-vision-preview"
    # "gpt-3.5-turbo-1106"

    @weave.op()
    async def predict(self, input: dict) -> dict:
        from openai import OpenAI

        pt("Actually predicting", input["emoji"], input["name"] + ":", input["prompt"])
        pt("Desktop:", input["desktop_img"], "Mobile:", input["mobile_img"])
        client = OpenAI()
        user_message = f"""{input['prompt']}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant