MCPcopy Index your code
hub / github.com/SkyworkAI/DeepResearchAgent / test_embedding

Function test_embedding

tests/test_models.py:120–141  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

118
119
120async def test_embedding():
121 logger.info(f"| --------------------------------------------------")
122 logger.info(f"| Testing embedding with different models")
123 models = [
124 # "openai/text-embedding-3-small",
125 "openai/text-embedding-3-large",
126 # "openai/text-embedding-ada-002",
127 ]
128
129 messages = [
130 SystemMessage(content="You are a helpful assistant."),
131 HumanMessage(content=[
132 ContentPartText(text="Please embed the text and provide the embedding."),
133 ContentPartText(text="The text is: The quick brown fox jumps over the lazy dog."),
134 ]),
135 ]
136
137 for model in models:
138 logger.info(f"| Testing {model}")
139 response = await model_manager(model=model, messages=messages)
140 logger.info(f"| {model} Response: {json.dumps(response.model_dump(), indent=4)}")
141 logger.info(f"| --------------------------------------------------")
142
143async def test_video():
144 logger.info(f"| --------------------------------------------------")

Callers

nothing calls this directly

Calls 5

SystemMessageClass · 0.90
HumanMessageClass · 0.90
ContentPartTextClass · 0.90
infoMethod · 0.45
model_dumpMethod · 0.45

Tested by

no test coverage detected