Open CristianBB opened 6 days ago
I have the same problem
I'm not getting this behavior -
(base) mattzhou@Matts-MacBook-Pro ~ % curl --location 'http://localhost:8283/v1/sources/' \
--header 'Authorization: Bearer password' \
--header 'Content-Type: application/json' \
--data '{
"name": "testing",
"description": "",
"embedding_config": {
"embedding_endpoint_type": "openai",
"embedding_endpoint": "https://api.openai.com/v1",
"embedding_model": "text-embedding-ada-002",
"embedding_dim": 1536,
"embedding_chunk_size": 300,
"azure_endpoint": null,
"azure_version": null,
"azure_deployment": null
}
}'
{"id":"source-90df2890-64ef-4f02-9388-754e55904eb2","name":"testing","description":"","embedding_config":{"embedding_endpoint_type":"openai","embedding_endpoint":"https://api.openai.com/v1","embedding_model":"text-embedding-ada-002","embedding_dim":1536,"embedding_chunk_size":300,"azure_endpoint":null,"azure_version":null,"azure_deployment":null},"organization_id":"org-00000000-0000-4000-8000-000000000000","metadata_":null,"created_by_id":"user-00000000-0000-4000-8000-000000000000","last_updated_by_id":"user-00000000-0000-4000-8000-000000000000","created_at":"2024-11-19T02:19:05","updated_at":"2024-11-19T02:1
Would you be able to share more about your environment/setup? Are you using docker?
@mattzh72 an off-topic question, I am also using letta api endpoint for development, but I do not know where to get the Bearer token for Authorization after deploying it on my server, how did u get it?
I'm not getting this behavior -
(base) mattzhou@Matts-MacBook-Pro ~ % curl --location 'http://localhost:8283/v1/sources/' \ --header 'Authorization: Bearer password' \ --header 'Content-Type: application/json' \ --data '{ "name": "testing", "description": "", "embedding_config": { "embedding_endpoint_type": "openai", "embedding_endpoint": "https://api.openai.com/v1", "embedding_model": "text-embedding-ada-002", "embedding_dim": 1536, "embedding_chunk_size": 300, "azure_endpoint": null, "azure_version": null, "azure_deployment": null } }' {"id":"source-90df2890-64ef-4f02-9388-754e55904eb2","name":"testing","description":"","embedding_config":{"embedding_endpoint_type":"openai","embedding_endpoint":"https://api.openai.com/v1","embedding_model":"text-embedding-ada-002","embedding_dim":1536,"embedding_chunk_size":300,"azure_endpoint":null,"azure_version":null,"azure_deployment":null},"organization_id":"org-00000000-0000-4000-8000-000000000000","metadata_":null,"created_by_id":"user-00000000-0000-4000-8000-000000000000","last_updated_by_id":"user-00000000-0000-4000-8000-000000000000","created_at":"2024-11-19T02:19:05","updated_at":"2024-11-19T02:1
Would you be able to share more about your environment/setup? Are you using docker?
Sure. I'm just cloning the repository, setting the .env file with OPENAI api key and executing docker compose up
I am using conda on my pc and installing using pip.
(letta) C:\Users\Ali>curl --location "http://localhost:8283/v1/sources/" ^
More? --header "Authorization: Bearer password" ^
More? --header "Content-Type: application/json" ^
More? --data "{ \"name\": \"test 13\", \"description\": \"\", \"embedding_config\": { \"embedding_endpoint_type\": \"openai\", \"embedding_endpoint\": \"https://api.openai.com/v1\", \"embedding_model\": \"text-embedding-ada-002\", \"embedding_dim\": 1536, \"embedding_chunk_size\": 300, \"azure_endpoint\": null, \"azure_version\": null, \"azure_deployment\": null }}"
{"description":null,"embedding_config":{"embedding_endpoint_type":"hugging-face","embedding_endpoint":"https://embeddings.memgpt.ai","embedding_model":"letta-free","embedding_dim":1024,"embedding_chunk_size":300,"azure_endpoint":null,"azure_version":null,"azure_deployment":null},"metadata_":null,"id":"source-3fae9c07-1d00-4e24-b146-5b78ccc83b82","name":"test 13","created_at":"2024-11-19T10:59:42.617175Z","user_id":"user-00000000-0000-4000-8000-000000000000"}
@CristianBB I was able to do a deep dive of the issue, looks like there were some bugs in the older version of Letta. Recently we have been rewriting our data models using ORMs, and that has helped stamp out a lot of these kinds of bugs. You have a couple options here - can you try using the more recent image (not latest)?
OR - you can use letta server
locally (no docker), and make sure OPENAI_API_KEY
in your shell environment. @matrixmayhem I'm fairly sure that should work for you too.
Describe the bug I'm trying to create sources by using OpenAI embeddings model (text-embedding-ada-002), however it's constantly being created with letta-free
Please describe your setup
git clone
docker compose up
Screenshots If applicable, add screenshots to help explain your problem.
Additional context 1- Try to create a source with embeddings model text-embedding-ada-002:
2- Response:
No matter how much I try to set the embeddings model for the source with ada-002, it's only created with letta-free. After creating the source I manually updated the property embedding_config from table "sources" (postgres DB) with the desired config to use openAI and new files uploaded to the source are being generated properly with ada-002 embeddings model, but there is no way from the API to create or even update a source with a different embeddings model
Letta Config Please attach your
~/.letta/config
file or copy past it below.