mirror of https://github.com/dapr/dapr-agents.git
Replaced floki module with dapr_agents and updated setup files
This commit is contained in:
parent
1a323f525a
commit
f902c99da8
|
|
@ -0,0 +1,11 @@
|
||||||
|
from dapr_agents.agent import (
|
||||||
|
Agent, AgentService,
|
||||||
|
AgenticWorkflowService, RoundRobinWorkflowService, RandomWorkflowService,
|
||||||
|
LLMWorkflowService, ReActAgent, ToolCallAgent, OpenAPIReActAgent
|
||||||
|
)
|
||||||
|
from dapr_agents.llm.openai import OpenAIChatClient, OpenAIAudioClient, OpenAIEmbeddingClient
|
||||||
|
from dapr_agents.llm.huggingface import HFHubChatClient
|
||||||
|
from dapr_agents.llm.nvidia import NVIDIAChatClient, NVIDIAEmbeddingClient
|
||||||
|
from dapr_agents.llm.elevenlabs import ElevenLabsSpeechClient
|
||||||
|
from dapr_agents.tool import AgentTool, tool
|
||||||
|
from dapr_agents.workflow import WorkflowApp
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
from floki.types.agent import AgentActorState, AgentActorMessage, AgentStatus, AgentTaskEntry, AgentTaskStatus
|
from dapr_agents.types.agent import AgentActorState, AgentActorMessage, AgentStatus, AgentTaskEntry, AgentTaskStatus
|
||||||
from floki.agent.actor.interface import AgentActorInterface
|
from dapr_agents.agent.actor.interface import AgentActorInterface
|
||||||
from floki.agent.base import AgentBase
|
from dapr_agents.agent.base import AgentBase
|
||||||
from dapr.actor.runtime.context import ActorRuntimeContext
|
from dapr.actor.runtime.context import ActorRuntimeContext
|
||||||
from dapr.actor import Actor
|
from dapr.actor import Actor
|
||||||
from dapr.actor.id import ActorId
|
from dapr.actor.id import ActorId
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
from abc import abstractmethod
|
from abc import abstractmethod
|
||||||
from dapr.actor import ActorInterface, actormethod
|
from dapr.actor import ActorInterface, actormethod
|
||||||
from floki.types.agent import AgentActorMessage, AgentStatus
|
from dapr_agents.types.agent import AgentActorMessage, AgentStatus
|
||||||
from typing import Union, List, Optional
|
from typing import Union, List, Optional
|
||||||
|
|
||||||
class AgentActorInterface(ActorInterface):
|
class AgentActorInterface(ActorInterface):
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
from floki.memory import MemoryBase, ConversationListMemory, ConversationVectorMemory
|
from dapr_agents.memory import MemoryBase, ConversationListMemory, ConversationVectorMemory
|
||||||
from floki.agent.utils.text_printer import ColorTextFormatter
|
from dapr_agents.agent.utils.text_printer import ColorTextFormatter
|
||||||
from floki.types import MessageContent, MessagePlaceHolder
|
from dapr_agents.types import MessageContent, MessagePlaceHolder
|
||||||
from floki.tool.executor import AgentToolExecutor
|
from dapr_agents.tool.executor import AgentToolExecutor
|
||||||
from floki.prompt.base import PromptTemplateBase
|
from dapr_agents.prompt.base import PromptTemplateBase
|
||||||
from floki.llm import LLMClientBase, OpenAIChatClient
|
from dapr_agents.llm import LLMClientBase, OpenAIChatClient
|
||||||
from floki.prompt import ChatPromptTemplate
|
from dapr_agents.prompt import ChatPromptTemplate
|
||||||
from floki.tool.base import AgentTool
|
from dapr_agents.tool.base import AgentTool
|
||||||
from typing import List, Optional, Dict, Any, Union, Callable, Literal
|
from typing import List, Optional, Dict, Any, Union, Callable, Literal
|
||||||
from pydantic import BaseModel, Field, PrivateAttr, model_validator, ConfigDict
|
from pydantic import BaseModel, Field, PrivateAttr, model_validator, ConfigDict
|
||||||
from abc import ABC, abstractmethod
|
from abc import ABC, abstractmethod
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
from floki.tool.utils.openapi import OpenAPISpecParser, openapi_spec_to_openai_fn
|
from dapr_agents.tool.utils.openapi import OpenAPISpecParser, openapi_spec_to_openai_fn
|
||||||
from floki.agent.patterns.react import ReActAgent
|
from dapr_agents.agent.patterns.react import ReActAgent
|
||||||
from floki.storage import VectorStoreBase
|
from dapr_agents.storage import VectorStoreBase
|
||||||
from floki.tool.storage import VectorToolStore
|
from dapr_agents.tool.storage import VectorToolStore
|
||||||
from typing import Dict, Optional, List, Any
|
from typing import Dict, Optional, List, Any
|
||||||
from pydantic import Field, ConfigDict
|
from pydantic import Field, ConfigDict
|
||||||
import logging
|
import logging
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
from floki.tool.utils.openapi import OpenAPISpecParser
|
from dapr_agents.tool.utils.openapi import OpenAPISpecParser
|
||||||
from floki.tool.storage import VectorToolStore
|
from dapr_agents.tool.storage import VectorToolStore
|
||||||
from floki.tool.base import tool
|
from dapr_agents.tool.base import tool
|
||||||
from pydantic import BaseModel ,Field, ConfigDict
|
from pydantic import BaseModel ,Field, ConfigDict
|
||||||
from typing import Optional, Any, Dict
|
from typing import Optional, Any, Dict
|
||||||
from urllib.parse import urlparse
|
from urllib.parse import urlparse
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
from floki.types import AgentError, AssistantMessage, ChatCompletion, FunctionCall
|
from dapr_agents.types import AgentError, AssistantMessage, ChatCompletion, FunctionCall
|
||||||
from floki.agent import AgentBase
|
from dapr_agents.agent import AgentBase
|
||||||
from floki.tool import AgentTool
|
from dapr_agents.tool import AgentTool
|
||||||
from typing import List, Dict, Any, Union, Callable, Literal, Optional, Tuple
|
from typing import List, Dict, Any, Union, Callable, Literal, Optional, Tuple
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from pydantic import Field, ConfigDict
|
from pydantic import Field, ConfigDict
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
from floki.types import AgentError, AssistantMessage, ChatCompletion, ToolMessage
|
from dapr_agents.types import AgentError, AssistantMessage, ChatCompletion, ToolMessage
|
||||||
from floki.agent import AgentBase
|
from dapr_agents.agent import AgentBase
|
||||||
from typing import List, Optional, Dict, Any, Union
|
from typing import List, Optional, Dict, Any, Union
|
||||||
from pydantic import Field, ConfigDict
|
from pydantic import Field, ConfigDict
|
||||||
import logging
|
import logging
|
||||||
|
|
@ -5,12 +5,12 @@ from dapr.actor import ActorProxy, ActorId
|
||||||
from fastapi import FastAPI, Depends, HTTPException, Request, Response, status
|
from fastapi import FastAPI, Depends, HTTPException, Request, Response, status
|
||||||
from fastapi.encoders import jsonable_encoder
|
from fastapi.encoders import jsonable_encoder
|
||||||
from fastapi.responses import JSONResponse
|
from fastapi.responses import JSONResponse
|
||||||
from floki.agent.services.messaging import parse_cloudevent
|
from dapr_agents.agent.services.messaging import parse_cloudevent
|
||||||
from floki.storage.daprstores.statestore import DaprStateStore
|
from dapr_agents.storage.daprstores.statestore import DaprStateStore
|
||||||
from floki.agent.actor import AgentActorBase, AgentActorInterface
|
from dapr_agents.agent.actor import AgentActorBase, AgentActorInterface
|
||||||
from floki.service.fastapi import DaprEnabledService
|
from dapr_agents.service.fastapi import DaprEnabledService
|
||||||
from floki.types.agent import AgentActorMessage
|
from dapr_agents.types.agent import AgentActorMessage
|
||||||
from floki.agent import AgentBase
|
from dapr_agents.agent import AgentBase
|
||||||
from pydantic import BaseModel, Field, model_validator, ConfigDict
|
from pydantic import BaseModel, Field, model_validator, ConfigDict
|
||||||
from typing import Optional, Any, Union
|
from typing import Optional, Any, Union
|
||||||
from contextlib import asynccontextmanager
|
from contextlib import asynccontextmanager
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
from floki.agent.services.base import AgentServiceBase
|
from dapr_agents.agent.services.base import AgentServiceBase
|
||||||
from floki.agent.services.messaging import message_router
|
from dapr_agents.agent.services.messaging import message_router
|
||||||
from floki.types.agent import AgentActorMessage
|
from dapr_agents.types.agent import AgentActorMessage
|
||||||
from floki.types.message import BaseMessage, EventMessageMetadata
|
from dapr_agents.types.message import BaseMessage, EventMessageMetadata
|
||||||
from fastapi import Response, status
|
from fastapi import Response, status
|
||||||
from pydantic import BaseModel
|
from pydantic import BaseModel
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
from typing import Optional, Any, Callable, get_type_hints, Tuple, Type, Dict
|
from typing import Optional, Any, Callable, get_type_hints, Tuple, Type, Dict
|
||||||
from floki.types.message import EventMessageMetadata
|
from dapr_agents.types.message import EventMessageMetadata
|
||||||
from pydantic import BaseModel, ValidationError
|
from pydantic import BaseModel, ValidationError
|
||||||
from inspect import signature, Parameter
|
from inspect import signature, Parameter
|
||||||
from cloudevents.http.event import CloudEvent
|
from cloudevents.http.event import CloudEvent
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
from floki.agent.patterns import ReActAgent, ToolCallAgent, OpenAPIReActAgent
|
from dapr_agents.agent.patterns import ReActAgent, ToolCallAgent, OpenAPIReActAgent
|
||||||
from floki.tool.utils.openapi import OpenAPISpecParser
|
from dapr_agents.tool.utils.openapi import OpenAPISpecParser
|
||||||
from floki.memory import ConversationListMemory
|
from dapr_agents.memory import ConversationListMemory
|
||||||
from floki.llm import OpenAIChatClient
|
from dapr_agents.llm import OpenAIChatClient
|
||||||
from floki.agent.base import AgentBase
|
from dapr_agents.agent.base import AgentBase
|
||||||
from floki.llm import LLMClientBase
|
from dapr_agents.llm import LLMClientBase
|
||||||
from floki.memory import MemoryBase
|
from dapr_agents.memory import MemoryBase
|
||||||
from floki.tool import AgentTool
|
from dapr_agents.tool import AgentTool
|
||||||
from typing import Optional, List, Union, Type, TypeVar
|
from typing import Optional, List, Union, Type, TypeVar
|
||||||
|
|
||||||
T = TypeVar('T', ToolCallAgent, ReActAgent, OpenAPIReActAgent)
|
T = TypeVar('T', ToolCallAgent, ReActAgent, OpenAPIReActAgent)
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
from floki.types import BaseMessage
|
from dapr_agents.types import BaseMessage
|
||||||
from typing import List
|
from typing import List
|
||||||
from pydantic import ValidationError
|
from pydantic import ValidationError
|
||||||
|
|
||||||
|
|
@ -1,14 +1,14 @@
|
||||||
from floki.types.message import BaseMessage
|
from dapr_agents.types.message import BaseMessage
|
||||||
from typing import Optional, Any, Union, Dict
|
from typing import Optional, Any, Union, Dict
|
||||||
from colorama import Style
|
from colorama import Style
|
||||||
|
|
||||||
# Define your custom colors as a dictionary
|
# Define your custom colors as a dictionary
|
||||||
COLORS = {
|
COLORS = {
|
||||||
"floki_teal": '\033[38;2;147;191;183m',
|
"dapr_agents_teal": '\033[38;2;147;191;183m',
|
||||||
"floki_mustard": '\033[38;2;242;182;128m',
|
"dapr_agents_mustard": '\033[38;2;242;182;128m',
|
||||||
"floki_red": '\033[38;2;217;95;118m',
|
"dapr_agents_red": '\033[38;2;217;95;118m',
|
||||||
"floki_pink": '\033[38;2;191;69;126m',
|
"dapr_agents_pink": '\033[38;2;191;69;126m',
|
||||||
"floki_purple": '\033[38;2;146;94;130m',
|
"dapr_agents_purple": '\033[38;2;146;94;130m',
|
||||||
"reset": Style.RESET_ALL
|
"reset": Style.RESET_ALL
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -83,10 +83,10 @@ class ColorTextFormatter:
|
||||||
content = message.get("content", "")
|
content = message.get("content", "")
|
||||||
|
|
||||||
color_map = {
|
color_map = {
|
||||||
"user": "floki_mustard",
|
"user": "dapr_agents_mustard",
|
||||||
"assistant": "floki_teal",
|
"assistant": "dapr_agents_teal",
|
||||||
"tool_calls": "floki_red",
|
"tool_calls": "dapr_agents_red",
|
||||||
"tool": "floki_pink"
|
"tool": "dapr_agents_pink"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Handle tool calls
|
# Handle tool calls
|
||||||
|
|
@ -135,9 +135,9 @@ class ColorTextFormatter:
|
||||||
content (str): The content to print.
|
content (str): The content to print.
|
||||||
"""
|
"""
|
||||||
color_map = {
|
color_map = {
|
||||||
"Thought": "floki_red",
|
"Thought": "dapr_agents_red",
|
||||||
"Action": "floki_pink",
|
"Action": "dapr_agents_pink",
|
||||||
"Observation": "floki_purple"
|
"Observation": "dapr_agents_purple"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Get the color for the part type, defaulting to reset if not found
|
# Get the color for the part type, defaulting to reset if not found
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
from floki.storage.daprstores.statestore import DaprStateStore
|
from dapr_agents.storage.daprstores.statestore import DaprStateStore
|
||||||
from floki.agent.utils.text_printer import ColorTextFormatter
|
from dapr_agents.agent.utils.text_printer import ColorTextFormatter
|
||||||
from floki.workflow.service import WorkflowAppService
|
from dapr_agents.workflow.service import WorkflowAppService
|
||||||
from fastapi import HTTPException
|
from fastapi import HTTPException
|
||||||
from pydantic import BaseModel, Field
|
from pydantic import BaseModel, Field
|
||||||
from typing import Any, Optional, Union
|
from typing import Any, Optional, Union
|
||||||
|
|
@ -118,11 +118,11 @@ class AgenticWorkflowService(WorkflowAppService):
|
||||||
|
|
||||||
# Print sender -> recipient and the message
|
# Print sender -> recipient and the message
|
||||||
interaction_text = [
|
interaction_text = [
|
||||||
(sender_agent_name, "floki_mustard"),
|
(sender_agent_name, "dapr_agents_mustard"),
|
||||||
(" -> ", "floki_teal"),
|
(" -> ", "dapr_agents_teal"),
|
||||||
(f"{recipient_agent_name}\n\n", "floki_mustard"),
|
(f"{recipient_agent_name}\n\n", "dapr_agents_mustard"),
|
||||||
(message + "\n\n", None),
|
(message + "\n\n", None),
|
||||||
(separator + "\n", "floki_teal"),
|
(separator + "\n", "dapr_agents_teal"),
|
||||||
]
|
]
|
||||||
|
|
||||||
# Print the formatted text
|
# Print the formatted text
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
from floki.agent.workflows.base import AgenticWorkflowService
|
from dapr_agents.agent.workflows.base import AgenticWorkflowService
|
||||||
from floki.types import DaprWorkflowContext, BaseMessage
|
from dapr_agents.types import DaprWorkflowContext, BaseMessage
|
||||||
from floki.llm import LLMClientBase, OpenAIChatClient
|
from dapr_agents.llm import LLMClientBase, OpenAIChatClient
|
||||||
from floki.prompt import ChatPromptTemplate
|
from dapr_agents.prompt import ChatPromptTemplate
|
||||||
from typing import Dict, Any, Optional
|
from typing import Dict, Any, Optional
|
||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
from pydantic import BaseModel, Field
|
from pydantic import BaseModel, Field
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
from floki.agent.workflows.base import AgenticWorkflowService
|
from dapr_agents.agent.workflows.base import AgenticWorkflowService
|
||||||
from floki.types import DaprWorkflowContext, BaseMessage
|
from dapr_agents.types import DaprWorkflowContext, BaseMessage
|
||||||
from typing import Dict, Any, Optional
|
from typing import Dict, Any, Optional
|
||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
from pydantic import BaseModel
|
from pydantic import BaseModel
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
from floki.agent.workflows.base import AgenticWorkflowService
|
from dapr_agents.agent.workflows.base import AgenticWorkflowService
|
||||||
from floki.types import DaprWorkflowContext, BaseMessage
|
from dapr_agents.types import DaprWorkflowContext, BaseMessage
|
||||||
from typing import Dict, Any, Optional
|
from typing import Dict, Any, Optional
|
||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
from pydantic import BaseModel
|
from pydantic import BaseModel
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
from floki.llm.nvidia.embeddings import NVIDIAEmbeddingClient
|
from dapr_agents.llm.nvidia.embeddings import NVIDIAEmbeddingClient
|
||||||
from floki.document.embedder.base import EmbedderBase
|
from dapr_agents.document.embedder.base import EmbedderBase
|
||||||
from typing import List, Union
|
from typing import List, Union
|
||||||
from pydantic import Field
|
from pydantic import Field
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
from floki.document.embedder.base import EmbedderBase
|
from dapr_agents.document.embedder.base import EmbedderBase
|
||||||
from floki.llm.openai.embeddings import OpenAIEmbeddingClient
|
from dapr_agents.llm.openai.embeddings import OpenAIEmbeddingClient
|
||||||
from typing import List, Any, Union, Optional
|
from typing import List, Any, Union, Optional
|
||||||
from pydantic import Field, ConfigDict
|
from pydantic import Field, ConfigDict
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
from floki.document.embedder.base import EmbedderBase
|
from dapr_agents.document.embedder.base import EmbedderBase
|
||||||
from typing import List, Any, Optional, Union, Literal
|
from typing import List, Any, Optional, Union, Literal
|
||||||
from pydantic import Field
|
from pydantic import Field
|
||||||
import logging
|
import logging
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
from floki.document.fetcher.base import FetcherBase
|
from dapr_agents.document.fetcher.base import FetcherBase
|
||||||
from floki.types.document import Document
|
from dapr_agents.types.document import Document
|
||||||
from typing import List, Dict, Optional, Union, Any
|
from typing import List, Dict, Optional, Union, Any
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
from floki.types.document import Document
|
from dapr_agents.types.document import Document
|
||||||
from abc import ABC, abstractmethod
|
from abc import ABC, abstractmethod
|
||||||
from pydantic import BaseModel
|
from pydantic import BaseModel
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
from floki.document.reader.base import ReaderBase
|
from dapr_agents.document.reader.base import ReaderBase
|
||||||
from floki.types.document import Document
|
from dapr_agents.types.document import Document
|
||||||
from typing import List, Dict, Optional
|
from typing import List, Dict, Optional
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
from floki.types.document import Document
|
from dapr_agents.types.document import Document
|
||||||
from floki.document.reader.base import ReaderBase
|
from dapr_agents.document.reader.base import ReaderBase
|
||||||
from typing import List, Dict, Optional
|
from typing import List, Dict, Optional
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
from floki.document.reader.base import ReaderBase
|
from dapr_agents.document.reader.base import ReaderBase
|
||||||
from floki.types.document import Document
|
from dapr_agents.types.document import Document
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import List
|
from typing import List
|
||||||
from pydantic import Field
|
from pydantic import Field
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
from pydantic import BaseModel, ConfigDict, Field
|
from pydantic import BaseModel, ConfigDict, Field
|
||||||
from abc import ABC, abstractmethod
|
from abc import ABC, abstractmethod
|
||||||
from typing import List, Optional, Callable
|
from typing import List, Optional, Callable
|
||||||
from floki.types.document import Document
|
from dapr_agents.types.document import Document
|
||||||
import re
|
import re
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
from floki.document.splitter.base import SplitterBase
|
from dapr_agents.document.splitter.base import SplitterBase
|
||||||
from typing import List
|
from typing import List
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
from floki.prompt.base import PromptTemplateBase
|
from dapr_agents.prompt.base import PromptTemplateBase
|
||||||
from floki.prompt.prompty import Prompty
|
from dapr_agents.prompt.prompty import Prompty
|
||||||
from typing import Union, Dict, Any, Optional
|
from typing import Union, Dict, Any, Optional
|
||||||
from pydantic import BaseModel, Field
|
from pydantic import BaseModel, Field
|
||||||
from abc import ABC, abstractmethod
|
from abc import ABC, abstractmethod
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
from floki.types.llm import ElevenLabsClientConfig
|
from dapr_agents.types.llm import ElevenLabsClientConfig
|
||||||
from floki.llm.base import LLMClientBase
|
from dapr_agents.llm.base import LLMClientBase
|
||||||
from typing import Any, Optional
|
from typing import Any, Optional
|
||||||
from pydantic import Field
|
from pydantic import Field
|
||||||
import os
|
import os
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
from floki.llm.elevenlabs.client import ElevenLabsClientBase
|
from dapr_agents.llm.elevenlabs.client import ElevenLabsClientBase
|
||||||
from typing import Optional, Union, Any
|
from typing import Optional, Union, Any
|
||||||
from pydantic import Field
|
from pydantic import Field
|
||||||
import logging
|
import logging
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
from floki.llm.huggingface.client import HFHubInferenceClientBase
|
from dapr_agents.llm.huggingface.client import HFHubInferenceClientBase
|
||||||
from floki.llm.utils import RequestHandler, ResponseHandler
|
from dapr_agents.llm.utils import RequestHandler, ResponseHandler
|
||||||
from floki.prompt.prompty import Prompty
|
from dapr_agents.prompt.prompty import Prompty
|
||||||
from floki.types.message import BaseMessage
|
from dapr_agents.types.message import BaseMessage
|
||||||
from floki.llm.chat import ChatClientBase
|
from dapr_agents.llm.chat import ChatClientBase
|
||||||
from floki.tool import AgentTool
|
from dapr_agents.tool import AgentTool
|
||||||
from typing import Union, Optional, Iterable, Dict, Any, List, Iterator, Type
|
from typing import Union, Optional, Iterable, Dict, Any, List, Iterator, Type
|
||||||
from pydantic import BaseModel
|
from pydantic import BaseModel
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
from floki.types.llm import HFInferenceClientConfig
|
from dapr_agents.types.llm import HFInferenceClientConfig
|
||||||
from floki.llm.base import LLMClientBase
|
from dapr_agents.llm.base import LLMClientBase
|
||||||
from typing import Optional, Dict, Any, Union
|
from typing import Optional, Dict, Any, Union
|
||||||
from huggingface_hub import InferenceClient
|
from huggingface_hub import InferenceClient
|
||||||
from pydantic import Field, model_validator
|
from pydantic import Field, model_validator
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
from floki.llm.utils import RequestHandler, ResponseHandler
|
from dapr_agents.llm.utils import RequestHandler, ResponseHandler
|
||||||
from floki.llm.nvidia.client import NVIDIAClientBase
|
from dapr_agents.llm.nvidia.client import NVIDIAClientBase
|
||||||
from floki.types.message import BaseMessage
|
from dapr_agents.types.message import BaseMessage
|
||||||
from floki.llm.chat import ChatClientBase
|
from dapr_agents.llm.chat import ChatClientBase
|
||||||
from floki.prompt.prompty import Prompty
|
from dapr_agents.prompt.prompty import Prompty
|
||||||
from floki.tool import AgentTool
|
from dapr_agents.tool import AgentTool
|
||||||
from typing import Union, Optional, Iterable, Dict, Any, List, Iterator, Type
|
from typing import Union, Optional, Iterable, Dict, Any, List, Iterator, Type
|
||||||
from openai.types.chat import ChatCompletionMessage
|
from openai.types.chat import ChatCompletionMessage
|
||||||
from pydantic import BaseModel, Field
|
from pydantic import BaseModel, Field
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
from floki.types.llm import NVIDIAClientConfig
|
from dapr_agents.types.llm import NVIDIAClientConfig
|
||||||
from floki.llm.base import LLMClientBase
|
from dapr_agents.llm.base import LLMClientBase
|
||||||
from typing import Any, Optional
|
from typing import Any, Optional
|
||||||
from pydantic import Field
|
from pydantic import Field
|
||||||
from openai import OpenAI
|
from openai import OpenAI
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
from openai.types.create_embedding_response import CreateEmbeddingResponse
|
from openai.types.create_embedding_response import CreateEmbeddingResponse
|
||||||
from floki.llm.nvidia.client import NVIDIAClientBase
|
from dapr_agents.llm.nvidia.client import NVIDIAClientBase
|
||||||
from typing import Union, Dict, Any, Literal, List, Optional
|
from typing import Union, Dict, Any, Literal, List, Optional
|
||||||
from pydantic import Field
|
from pydantic import Field
|
||||||
import logging
|
import logging
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
from floki.llm.openai.client.base import OpenAIClientBase
|
from dapr_agents.llm.openai.client.base import OpenAIClientBase
|
||||||
from floki.llm.utils import RequestHandler
|
from dapr_agents.llm.utils import RequestHandler
|
||||||
from floki.types.llm import (
|
from dapr_agents.types.llm import (
|
||||||
AudioSpeechRequest, AudioTranscriptionRequest,
|
AudioSpeechRequest, AudioTranscriptionRequest,
|
||||||
AudioTranslationRequest, AudioTranscriptionResponse, AudioTranslationResponse,
|
AudioTranslationRequest, AudioTranscriptionResponse, AudioTranslationResponse,
|
||||||
)
|
)
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
from floki.types.llm import AzureOpenAIModelConfig, OpenAIModelConfig
|
from dapr_agents.types.llm import AzureOpenAIModelConfig, OpenAIModelConfig
|
||||||
from floki.llm.utils import RequestHandler, ResponseHandler
|
from dapr_agents.llm.utils import RequestHandler, ResponseHandler
|
||||||
from floki.llm.openai.client.base import OpenAIClientBase
|
from dapr_agents.llm.openai.client.base import OpenAIClientBase
|
||||||
from floki.types.message import BaseMessage
|
from dapr_agents.types.message import BaseMessage
|
||||||
from floki.llm.chat import ChatClientBase
|
from dapr_agents.llm.chat import ChatClientBase
|
||||||
from floki.prompt.prompty import Prompty
|
from dapr_agents.prompt.prompty import Prompty
|
||||||
from floki.tool import AgentTool
|
from dapr_agents.tool import AgentTool
|
||||||
from typing import Union, Optional, Iterable, Dict, Any, List, Iterator, Type
|
from typing import Union, Optional, Iterable, Dict, Any, List, Iterator, Type
|
||||||
from openai.types.chat import ChatCompletionMessage
|
from openai.types.chat import ChatCompletionMessage
|
||||||
from pydantic import BaseModel, Field, model_validator
|
from pydantic import BaseModel, Field, model_validator
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
from azure.identity import DefaultAzureCredential, ManagedIdentityCredential, get_bearer_token_provider
|
from azure.identity import DefaultAzureCredential, ManagedIdentityCredential, get_bearer_token_provider
|
||||||
from floki.types.llm import AzureOpenAIClientConfig
|
from dapr_agents.types.llm import AzureOpenAIClientConfig
|
||||||
from floki.llm.utils import HTTPHelper
|
from dapr_agents.llm.utils import HTTPHelper
|
||||||
from openai import AzureOpenAI
|
from openai import AzureOpenAI
|
||||||
from typing import Union, Optional
|
from typing import Union, Optional
|
||||||
import logging
|
import logging
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
from floki.types.llm import OpenAIClientConfig, AzureOpenAIClientConfig
|
from dapr_agents.types.llm import OpenAIClientConfig, AzureOpenAIClientConfig
|
||||||
from floki.llm.openai.client import AzureOpenAIClient, OpenAIClient
|
from dapr_agents.llm.openai.client import AzureOpenAIClient, OpenAIClient
|
||||||
from floki.llm.base import LLMClientBase
|
from dapr_agents.llm.base import LLMClientBase
|
||||||
from openai import OpenAI, AzureOpenAI
|
from openai import OpenAI, AzureOpenAI
|
||||||
from typing import Any, Optional, Union, Dict
|
from typing import Any, Optional, Union, Dict
|
||||||
from pydantic import Field
|
from pydantic import Field
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
from floki.types.llm import OpenAIClientConfig
|
from dapr_agents.types.llm import OpenAIClientConfig
|
||||||
from floki.llm.utils import HTTPHelper
|
from dapr_agents.llm.utils import HTTPHelper
|
||||||
from typing import Union, Optional
|
from typing import Union, Optional
|
||||||
from openai import OpenAI
|
from openai import OpenAI
|
||||||
import logging
|
import logging
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
from openai.types.create_embedding_response import CreateEmbeddingResponse
|
from openai.types.create_embedding_response import CreateEmbeddingResponse
|
||||||
from floki.llm.openai.client.base import OpenAIClientBase
|
from dapr_agents.llm.openai.client.base import OpenAIClientBase
|
||||||
from typing import Union, Dict, Any, Literal, List, Optional
|
from typing import Union, Dict, Any, Literal, List, Optional
|
||||||
from pydantic import Field, model_validator
|
from pydantic import Field, model_validator
|
||||||
import logging
|
import logging
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
from typing import Dict, Any, Optional, List, Type, Union, Iterable
|
from typing import Dict, Any, Optional, List, Type, Union, Iterable
|
||||||
from floki.prompt.prompty import Prompty, PromptyHelper
|
from dapr_agents.prompt.prompty import Prompty, PromptyHelper
|
||||||
from floki.types.message import BaseMessage
|
from dapr_agents.types.message import BaseMessage
|
||||||
from floki.llm.utils import StructureHandler
|
from dapr_agents.llm.utils import StructureHandler
|
||||||
from floki.tool.utils.tool import ToolHelper
|
from dapr_agents.tool.utils.tool import ToolHelper
|
||||||
from pydantic import BaseModel, ValidationError
|
from pydantic import BaseModel, ValidationError
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
from typing import Union, Dict, Any, Type, Optional, Iterator
|
from typing import Union, Dict, Any, Type, Optional, Iterator
|
||||||
from floki.llm.utils import StreamHandler, StructureHandler
|
from dapr_agents.llm.utils import StreamHandler, StructureHandler
|
||||||
from dataclasses import is_dataclass, asdict
|
from dataclasses import is_dataclass, asdict
|
||||||
from floki.types import ChatCompletion
|
from dapr_agents.types import ChatCompletion
|
||||||
from pydantic import BaseModel
|
from pydantic import BaseModel
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
from typing import Dict, Any, Iterator, Type, TypeVar, Union, Optional, Iterable, get_args
|
from typing import Dict, Any, Iterator, Type, TypeVar, Union, Optional, Iterable, get_args
|
||||||
from floki.llm.utils import StructureHandler
|
from dapr_agents.llm.utils import StructureHandler
|
||||||
from floki.types import ToolCall
|
from dapr_agents.types import ToolCall
|
||||||
from openai.types.chat import ChatCompletionChunk
|
from openai.types.chat import ChatCompletionChunk
|
||||||
from pydantic import BaseModel, ValidationError
|
from pydantic import BaseModel, ValidationError
|
||||||
import logging
|
import logging
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
from typing import Type, TypeVar, Optional, Union, List, get_args, Any
|
from typing import Type, TypeVar, Optional, Union, List, get_args, Any
|
||||||
from pydantic import BaseModel, Field, create_model, ValidationError
|
from pydantic import BaseModel, Field, create_model, ValidationError
|
||||||
from floki.tool.utils.function_calling import to_function_call_definition
|
from dapr_agents.tool.utils.function_calling import to_function_call_definition
|
||||||
from floki.types import StructureError
|
from dapr_agents.types import StructureError
|
||||||
from collections.abc import Iterable
|
from collections.abc import Iterable
|
||||||
import logging
|
import logging
|
||||||
import json
|
import json
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
from floki.types import BaseMessage
|
from dapr_agents.types import BaseMessage
|
||||||
from pydantic import BaseModel, ConfigDict
|
from pydantic import BaseModel, ConfigDict
|
||||||
from abc import ABC, abstractmethod
|
from abc import ABC, abstractmethod
|
||||||
from typing import List
|
from typing import List
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
from floki.storage.daprstores.statestore import DaprStateStore
|
from dapr_agents.storage.daprstores.statestore import DaprStateStore
|
||||||
from floki.types import BaseMessage
|
from dapr_agents.types import BaseMessage
|
||||||
from floki.memory import MemoryBase
|
from dapr_agents.memory import MemoryBase
|
||||||
from typing import List, Union, Optional, Dict, Any
|
from typing import List, Union, Optional, Dict, Any
|
||||||
from pydantic import Field, model_validator
|
from pydantic import Field, model_validator
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
from floki.memory import MemoryBase
|
from dapr_agents.memory import MemoryBase
|
||||||
from floki.types import BaseMessage
|
from dapr_agents.types import BaseMessage
|
||||||
from pydantic import Field
|
from pydantic import Field
|
||||||
from typing import List, Dict, Union
|
from typing import List, Dict, Union
|
||||||
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
from floki.storage.vectorstores import VectorStoreBase
|
from dapr_agents.storage.vectorstores import VectorStoreBase
|
||||||
from floki.types import MessageContent, UserMessage, AssistantMessage
|
from dapr_agents.types import MessageContent, UserMessage, AssistantMessage
|
||||||
from floki.memory import MemoryBase
|
from dapr_agents.memory import MemoryBase
|
||||||
from datetime import datetime, timezone
|
from datetime import datetime, timezone
|
||||||
from pydantic import Field
|
from pydantic import Field
|
||||||
from typing import List, Optional
|
from typing import List, Optional
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
from floki.prompt.utils.jinja import render_jinja_template, extract_jinja_variables
|
from dapr_agents.prompt.utils.jinja import render_jinja_template, extract_jinja_variables
|
||||||
from floki.prompt.utils.fstring import render_fstring_template, extract_fstring_variables
|
from dapr_agents.prompt.utils.fstring import render_fstring_template, extract_fstring_variables
|
||||||
from floki.prompt.utils.chat import ChatPromptHelper
|
from dapr_agents.prompt.utils.chat import ChatPromptHelper
|
||||||
from floki.prompt.base import PromptTemplateBase
|
from dapr_agents.prompt.base import PromptTemplateBase
|
||||||
from floki.types.message import BaseMessage, SystemMessage, UserMessage, AssistantMessage, ToolMessage, MessagePlaceHolder
|
from dapr_agents.types.message import BaseMessage, SystemMessage, UserMessage, AssistantMessage, ToolMessage, MessagePlaceHolder
|
||||||
from typing import Any, Dict, List, Tuple, Union, Literal, Optional
|
from typing import Any, Dict, List, Tuple, Union, Literal, Optional
|
||||||
from pydantic import Field
|
from pydantic import Field
|
||||||
import logging
|
import logging
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
from floki.types.llm import PromptyModelConfig, OpenAIModelConfig, AzureOpenAIModelConfig, PromptyDefinition
|
from dapr_agents.types.llm import PromptyModelConfig, OpenAIModelConfig, AzureOpenAIModelConfig, PromptyDefinition
|
||||||
from floki.prompt.base import PromptTemplateBase
|
from dapr_agents.prompt.base import PromptTemplateBase
|
||||||
from floki.prompt.chat import ChatPromptTemplate
|
from dapr_agents.prompt.chat import ChatPromptTemplate
|
||||||
from floki.prompt.string import StringPromptTemplate
|
from dapr_agents.prompt.string import StringPromptTemplate
|
||||||
from floki.prompt.utils.prompty import PromptyHelper
|
from dapr_agents.prompt.utils.prompty import PromptyHelper
|
||||||
from typing import Dict, Any, Union, Optional, Literal, List, Tuple
|
from typing import Dict, Any, Union, Optional, Literal, List, Tuple
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
import logging
|
import logging
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
from floki.prompt.base import PromptTemplateBase
|
from dapr_agents.prompt.base import PromptTemplateBase
|
||||||
from floki.prompt.utils.string import StringPromptHelper
|
from dapr_agents.prompt.utils.string import StringPromptHelper
|
||||||
from typing import Any, Union, Literal
|
from typing import Any, Union, Literal
|
||||||
|
|
||||||
class StringPromptTemplate(PromptTemplateBase):
|
class StringPromptTemplate(PromptTemplateBase):
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
from floki.types.message import BaseMessage, SystemMessage, UserMessage, AssistantMessage, ToolMessage
|
from dapr_agents.types.message import BaseMessage, SystemMessage, UserMessage, AssistantMessage, ToolMessage
|
||||||
from floki.prompt.utils.jinja import render_jinja_template, extract_jinja_variables
|
from dapr_agents.prompt.utils.jinja import render_jinja_template, extract_jinja_variables
|
||||||
from floki.prompt.utils.fstring import render_fstring_template, extract_fstring_variables
|
from dapr_agents.prompt.utils.fstring import render_fstring_template, extract_fstring_variables
|
||||||
from typing import Any, Dict, List, Tuple, Union, Optional
|
from typing import Any, Dict, List, Tuple, Union, Optional
|
||||||
import re
|
import re
|
||||||
import logging
|
import logging
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
from floki.types.message import UserMessage, AssistantMessage, SystemMessage, ToolMessage, BaseMessage
|
from dapr_agents.types.message import UserMessage, AssistantMessage, SystemMessage, ToolMessage, BaseMessage
|
||||||
from floki.prompt.utils.fstring import extract_fstring_variables
|
from dapr_agents.prompt.utils.fstring import extract_fstring_variables
|
||||||
from floki.prompt.utils.jinja import extract_jinja_variables
|
from dapr_agents.prompt.utils.jinja import extract_jinja_variables
|
||||||
from typing import Dict, Any, Tuple, Optional, Union, List, Literal
|
from typing import Dict, Any, Tuple, Optional, Union, List, Literal
|
||||||
from jinja2 import Template, TemplateError
|
from jinja2 import Template, TemplateError
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
from floki.prompt.utils.jinja import render_jinja_template, extract_jinja_variables
|
from dapr_agents.prompt.utils.jinja import render_jinja_template, extract_jinja_variables
|
||||||
from floki.prompt.utils.fstring import render_fstring_template, extract_fstring_variables
|
from dapr_agents.prompt.utils.fstring import render_fstring_template, extract_fstring_variables
|
||||||
from typing import Any, Dict
|
from typing import Any, Dict
|
||||||
|
|
||||||
DEFAULT_FORMATTER_MAPPING = {
|
DEFAULT_FORMATTER_MAPPING = {
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
from floki.storage.daprstores.statestore import DaprStateStore
|
from dapr_agents.storage.daprstores.statestore import DaprStateStore
|
||||||
from floki.service.fastapi.base import ServiceBase
|
from dapr_agents.service.fastapi.base import ServiceBase
|
||||||
from dapr.conf import settings as dapr_settings
|
from dapr.conf import settings as dapr_settings
|
||||||
from dapr.ext.fastapi import DaprApp
|
from dapr.ext.fastapi import DaprApp
|
||||||
from dapr.aio.clients import DaprClient
|
from dapr.aio.clients import DaprClient
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
from floki.storage.daprstores.base import DaprStoreBase
|
from dapr_agents.storage.daprstores.base import DaprStoreBase
|
||||||
from dapr.clients import DaprClient
|
from dapr.clients import DaprClient
|
||||||
from typing import Dict, Optional
|
from typing import Dict, Optional
|
||||||
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
from dapr.clients.grpc._response import StateResponse, BulkStatesResponse, BulkStateItem, StateResponse
|
from dapr.clients.grpc._response import StateResponse, BulkStatesResponse, BulkStateItem, StateResponse
|
||||||
from dapr.clients.grpc._state import StateItem
|
from dapr.clients.grpc._state import StateItem
|
||||||
from floki.storage.daprstores.base import DaprStoreBase
|
from dapr_agents.storage.daprstores.base import DaprStoreBase
|
||||||
from dapr.clients.grpc._response import QueryResponse
|
from dapr.clients.grpc._response import QueryResponse
|
||||||
from dapr.clients import DaprClient
|
from dapr.clients import DaprClient
|
||||||
from typing import Optional, Union, Dict, List, Tuple
|
from typing import Optional, Union, Dict, List, Tuple
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue