MCPcopy Create free account
hub / github.com/zai-org/ChatGLM3 / embedding

Function embedding

openai_api_demo/openai_api_request.py:86–92  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

84
85
86def embedding():
87 response = client.embeddings.create(
88 model="bge-large-zh-1.5",
89 input=["你好,给我讲一个故事,大概100字"],
90 )
91 embeddings = response.data[0].embedding
92 print("嵌入完成,维度:", len(embeddings))
93
94
95if __name__ == "__main__":

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected