mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2025-12-18 14:34:23 +01:00
fix dict type annotation
This commit is contained in:
@@ -59,7 +59,7 @@ def create_chat_completion(
|
|||||||
"""Create a chat completion using the OpenAI API
|
"""Create a chat completion using the OpenAI API
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
messages (list[dict[str, str]]): The messages to send to the chat completion
|
messages (List[Dict[str, str]]): The messages to send to the chat completion
|
||||||
model (str, optional): The model to use. Defaults to None.
|
model (str, optional): The model to use. Defaults to None.
|
||||||
temperature (float, optional): The temperature to use. Defaults to 0.9.
|
temperature (float, optional): The temperature to use. Defaults to 0.9.
|
||||||
max_tokens (int, optional): The max tokens to use. Defaults to None.
|
max_tokens (int, optional): The max tokens to use. Defaults to None.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
"""Text processing functions"""
|
"""Text processing functions"""
|
||||||
from typing import Generator, Optional
|
from typing import Generator, Optional, Dict
|
||||||
from selenium.webdriver.remote.webdriver import WebDriver
|
from selenium.webdriver.remote.webdriver import WebDriver
|
||||||
from autogpt.memory import get_memory
|
from autogpt.memory import get_memory
|
||||||
from autogpt.config import Config
|
from autogpt.config import Config
|
||||||
@@ -114,7 +114,7 @@ def scroll_to_percentage(driver: WebDriver, ratio: float) -> None:
|
|||||||
driver.execute_script(f"window.scrollTo(0, document.body.scrollHeight * {ratio});")
|
driver.execute_script(f"window.scrollTo(0, document.body.scrollHeight * {ratio});")
|
||||||
|
|
||||||
|
|
||||||
def create_message(chunk: str, question: str) -> dict[str, str]:
|
def create_message(chunk: str, question: str) -> Dict[str, str]:
|
||||||
"""Create a message for the chat completion
|
"""Create a message for the chat completion
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
@@ -122,7 +122,7 @@ def create_message(chunk: str, question: str) -> dict[str, str]:
|
|||||||
question (str): The question to answer
|
question (str): The question to answer
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
dict[str, str]: The message to send to the chat completion
|
Dict[str, str]: The message to send to the chat completion
|
||||||
"""
|
"""
|
||||||
return {
|
return {
|
||||||
"role": "user",
|
"role": "user",
|
||||||
|
|||||||
Reference in New Issue
Block a user