Skip to content

Commit

Permalink
Fix client
Browse files Browse the repository at this point in the history
  • Loading branch information
mattzh72 committed Nov 7, 2024
1 parent 1f3bee4 commit 1900e9f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion letta/client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1198,7 +1198,8 @@ def create_source(self, name: str, embedding_config: Optional[EmbeddingConfig] =
Returns:
source (Source): Created source
"""
payload = SourceCreate(name=name, embedding_config=embedding_config or self._default_embedding_config)
source_create = SourceCreate(name=name, embedding_config=embedding_config or self._default_embedding_config)
payload = source_create.model_dump()
response = requests.post(f"{self.base_url}/{self.api_prefix}/sources", json=payload, headers=self.headers)
response_json = response.json()
return Source(**response_json)
Expand Down

0 comments on commit 1900e9f

Please sign in to comment.