Skip to content

Commit

Permalink
black
Browse files Browse the repository at this point in the history
  • Loading branch information
matt-bernstein committed Apr 2, 2024
1 parent 1a862d6 commit 013c75a
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions adala/runtimes/_openai.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@
from typing import Optional, Dict, Any, List
from openai import OpenAI, NotFoundError
from pydantic import (
model_validator,
field_validator,
ValidationInfo,
Field,
computed_field,
ConfigDict
)
from .base import Runtime, AsyncRuntime
from adala.utils.logs import print_error
Expand Down Expand Up @@ -162,8 +160,7 @@ class OpenAIChatRuntime(Runtime):
max_tokens: Maximum number of tokens to generate. Defaults to 1000.
"""

class Config:
arbitrary_types_allowed = True # for @computed_field
model_config = ConfigDict(arbitrary_types_allowed=True) # for @computed_field

openai_model: str = Field(alias="model")
openai_api_key: Optional[str] = Field(
Expand Down

0 comments on commit 013c75a

Please sign in to comment.