Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 37 for get_model (0.44 seconds)

  1. docs_src/path_params/tutorial005_py310.py

    from fastapi import FastAPI
    
    
    class ModelName(str, Enum):
        alexnet = "alexnet"
        resnet = "resnet"
        lenet = "lenet"
    
    
    app = FastAPI()
    
    
    @app.get("/models/{model_name}")
    async def get_model(model_name: ModelName):
        if model_name is ModelName.alexnet:
            return {"model_name": model_name, "message": "Deep Learning FTW!"}
    
        if model_name.value == "lenet":
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 546 bytes
    - Click Count (0)
  2. tests/test_datetime_custom_encoder.py

        app = FastAPI()
        model = ModelWithDatetimeField(dt_field=datetime(2019, 1, 1, 8))
    
        @app.get("/model", response_model=ModelWithDatetimeField)
        def get_model():
            return model
    
        client = TestClient(app)
        with client:
            response = client.get("/model")
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sat Dec 27 12:54:56 GMT 2025
    - 817 bytes
    - Click Count (0)
  3. src/test/java/org/codelibs/fess/llm/LlmChatResponseTest.java

        @Test
        public void test_setModel() {
            final LlmChatResponse response = new LlmChatResponse();
    
            response.setModel("llama3");
            assertEquals("llama3", response.getModel());
    
            response.setModel("gpt-3.5-turbo");
            assertEquals("gpt-3.5-turbo", response.getModel());
        }
    
        @Test
        public void test_nullValues() {
    Created: Tue Mar 31 13:07:34 GMT 2026
    - Last Modified: Wed Jan 14 14:29:07 GMT 2026
    - 5.1K bytes
    - Click Count (0)
  4. tests/test_filter_pydantic_sub_model_pv2.py

                    raise ValueError("name must end in A")
                return name
    
        async def get_model_c() -> ModelC:
            return ModelC(username="test-user", password="test-password")
    
        @app.get("/model/{name}", response_model=ModelA)
        async def get_model_a(name: str, model_c=Depends(get_model_c)):
            return {
                "name": name,
                "description": "model-a-desc",
                "foo": model_c,
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Tue Feb 17 09:59:14 GMT 2026
    - 6.7K bytes
    - Click Count (0)
  5. src/test/java/org/codelibs/fess/llm/LlmChatRequestTest.java

        }
    
        @Test
        public void test_setModel() {
            final LlmChatRequest request = new LlmChatRequest();
    
            final LlmChatRequest result = request.setModel("gpt-4");
    
            assertSame(request, result);
            assertEquals("gpt-4", request.getModel());
        }
    
        @Test
        public void test_setMaxTokens() {
            final LlmChatRequest request = new LlmChatRequest();
    
    Created: Tue Mar 31 13:07:34 GMT 2026
    - Last Modified: Wed Jan 14 14:29:07 GMT 2026
    - 5.8K bytes
    - Click Count (0)
  6. src/main/java/org/codelibs/fess/llm/LlmChatResponse.java

        }
    
        /**
         * Gets the model name.
         *
         * @return the model name
         */
        public String getModel() {
            return model;
        }
    
        /**
         * Sets the model name.
         *
         * @param model the model name
         */
        public void setModel(final String model) {
            this.model = model;
        }
    Created: Tue Mar 31 13:07:34 GMT 2026
    - Last Modified: Mon Jan 12 10:32:40 GMT 2026
    - 3.4K bytes
    - Click Count (0)
  7. compat/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java

                List<ModelData> lineage, ModelBuildingRequest request, ModelProblemCollector problems) {
            for (int i = lineage.size() - 2; i >= 0; i--) {
                Model parent = lineage.get(i + 1).getModel();
                Model child = lineage.get(i).getModel();
                inheritanceAssembler.assembleModelInheritance(child, parent, request, problems);
            }
        }
    
        private List<Profile> getProfiles(Model model) {
    Created: Sun Apr 05 03:35:12 GMT 2026
    - Last Modified: Sun Mar 30 23:08:08 GMT 2025
    - 55.3K bytes
    - Click Count (0)
  8. src/main/java/org/codelibs/fess/llm/LlmChatRequest.java

         * Gets the model name.
         *
         * @return the model name
         */
        public String getModel() {
            return model;
        }
    
        /**
         * Sets the model name.
         *
         * @param model the model name
         * @return this request for method chaining
         */
        public LlmChatRequest setModel(final String model) {
            this.model = model;
            return this;
        }
    
        /**
    Created: Tue Mar 31 13:07:34 GMT 2026
    - Last Modified: Thu Mar 05 03:38:31 GMT 2026
    - 6.4K bytes
    - Click Count (0)
  9. compat/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelData.java

         * Gets the model being wrapped.
         *
         * @return The model or {@code null} if not set.
         */
        public Model getModel() {
            return model;
        }
    
        /**
         * Sets the model being wrapped.
         *
         * @param model The model, may be {@code null}.
         */
        public void setModel(Model model) {
            this.model = model;
        }
    
        /**
         * Gets the raw model being wrapped.
         *
    Created: Sun Apr 05 03:35:12 GMT 2026
    - Last Modified: Tue Feb 25 08:27:34 GMT 2025
    - 5.8K bytes
    - Click Count (0)
  10. compat/maven-compat/src/main/java/org/apache/maven/toolchain/DefaultToolchain.java

                if (!Objects.equals(type, other.type)) {
                    return false;
                }
    
                Properties thisProvides = this.getModel().getProvides();
                Properties otherProvides = other.getModel().getProvides();
    
                return Objects.equals(thisProvides, otherProvides);
            } else {
                return false;
            }
        }
    
        @Override
    Created: Sun Apr 05 03:35:12 GMT 2026
    - Last Modified: Wed Feb 12 13:13:28 GMT 2025
    - 4.8K bytes
    - Click Count (0)
Back to Top