[docs/swarms/utils/phoenix_tracer.md]

pull/286/head
Kye 1 year ago
parent 30904e244e
commit 54deaccc6f

@ -105,6 +105,8 @@ nav:
- Weaviate: "swarms/memory/weaviate.md"
- PineconeVectorStoreStore: "swarms/memory/pinecone.md"
- PGVectorStore: "swarms/memory/pg.md"
- swarms.utils:
- phoenix_trace_decorator: "swarms/utils/phoenix_tracer.md"
- Guides:
- Overview: "examples/index.md"
- Agents:

@ -0,0 +1,38 @@
import os
from swarms.structs import Agent
from swarms.memory import WeaviateClient
from swarms.utils.phoenix_handler import phoenix_trace_decorator
from swarms.models.vllm import vLLM
from dotenv import load_dotenv
load_dotenv()
# Model
llm = vLLM()
# Weaviate
weaviate_client = WeaviateClient(
http_host="localhost",
http_port="8080",
http_secure=False,
grpc_host="localhost",
grpc_port="8081",
grpc_secure=False,
auth_client_secret="YOUR_APIKEY",
additional_headers={"X-OpenAI-Api-Key": "YOUR_OPENAI_APIKEY"},
additional_config=None, # You can pass additional configuration here
)
# Agent
@phoenix_trace_decorator
@
def agent(task: str):
agent = Agent(
llm = llm,
max_loops=1,
)
out = agent.run(task=task)
return out

@ -5,9 +5,15 @@ from swarms.utils.parse_code import (
)
from swarms.utils.pdf_to_text import pdf_to_text
try:
from swarms.utils.phoenix_handler import phoenix_trace_decorator
except ImportError:
pass
__all__ = [
"display_markdown_message",
"SubprocessCodeInterpreter",
"extract_code_in_backticks_in_string",
"pdf_to_text",
"phoenix_trace_decorator"
]

Loading…
Cancel
Save