Skip to content

Commit

Permalink
fix: chat parameters (#39)
Browse files Browse the repository at this point in the history
* fix: parameters for chat create

* fix: imports
  • Loading branch information
asafgardin authored Jan 18, 2024
1 parent c36a0e4 commit bac77e9
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions ai21/clients/studio/resources/studio_chat.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
from typing import List, Any, Optional, Dict
from typing import List, Optional

from ai21.clients.common.chat_base import Chat
from ai21.clients.studio.resources.studio_resource import StudioResource
from ai21.models.chat_message import ChatMessage
from ai21.models.penalty import Penalty
from ai21.models.responses.chat_response import ChatResponse


Expand All @@ -20,9 +21,9 @@ def create(
top_p: Optional[float] = 1.0,
top_k_returns: Optional[int] = 0,
stop_sequences: Optional[List[str]] = None,
frequency_penalty: Optional[Dict[str, Any]] = None,
presence_penalty: Optional[Dict[str, Any]] = None,
count_penalty: Optional[Dict[str, Any]] = None,
frequency_penalty: Optional[Penalty] = None,
presence_penalty: Optional[Penalty] = None,
count_penalty: Optional[Penalty] = None,
**kwargs,
) -> ChatResponse:
body = self._create_body(
Expand Down

0 comments on commit bac77e9

Please sign in to comment.